Paging all able developers, please produce an extended power menu. Going into CWM to press the reboot option is really too much trouble.
I tried to build, but unfortunately no success....
I roughly followed steps here: http://forum.xda-developers.com/showthread.php?t=1169443
No problem with the part on framework-res.apk....everything workin fine, 6 new Hex numbers were generated.
On part with android.policy.jar, I modified GlobalActions.smali the following way
a) I replaced "const/4 v9, 0x4" with "const/4 v9, 0x7"
b) I put in following code above "invoke-static {v0}, Lcom/google/android/collect/Lists;->newArrayList....."
Code:
const/4 v1, 0x4
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$9;
const v3, 0x1080523
const v4, 0x10405c4
invoke-direct {v2, p0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$9;-><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$10;
const v3, 0x1080524
const v4, 0x10405c2
invoke-direct {v2, p0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$10;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
aput-object v2, v0, v1
const/4 v1, 0x6
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$11;
const v3, 0x1080522
const v4, 0x10405c3
invoke-direct {v2, p0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$11;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
aput-object v2, v0, v1
(We have to follow up with GlobalActions$9 because GlobalActions$8 is already used on Note)
c) I generated the 3 new smalis (...$9 up to ...$11) and made the changes the way shown on sicopats HowTo. I took GlobalActions$5 for duplication, cause on Note this one contains Shutdown
After recompile/baksmali of both files I flashed them - but no Menu showing up any more...even the general Power Menu is gone...
So I think someone with deeper knowledge on smali coding has to do that...
1. Did you update new public ID`s in GolbalActions.smali from new compiled and then decompiled framework-res?
he_stheone64 said:
1. Did you update new public ID`s in GolbalActions.smali from new compiled and then decompiled framework-res?
Click to expand...
Click to collapse
of course
eybee1970 said:
I tried to build, but unfortunately no success....
Click to expand...
Click to collapse
Already got an idea (or two) what went wrong here but I need some additional infos (and of course the stock framework-res.apk) to verify this.
Please take a look at your stock build.prop and tell me which number is set at this line -> "ro.build.version.sdk="
MCOGW said:
Already got an idea (or two) what went wrong here but I need some additional infos (and of course the stock framework-res.apk) to verify this.
Please take a look at your stock build.prop and tell me which number is set at this line -> "ro.build.version.sdk="
Click to expand...
Click to collapse
@eyebee are you still working on this part.
He is, with some help from a friend, see post directly above yours
darkmax1974 said:
Paging all able developers, please produce an extended power menu. Going into CWM to press the reboot option is really too much trouble.
Click to expand...
Click to collapse
i am working on it ,, just give me a day or 2
i will do my best
many tries failed due to arrays problem
i believe that i am so close to solve it
hope me best of luck
success
i will use it in my ROM for note soon
Homam Ageel said:
success
i will use it in my ROM for note soon
Click to expand...
Click to collapse
Can u release as a stand alone mod ?
drgopoos said:
Can u release as a stand alone mod ?
Click to expand...
Click to collapse
i will after releasing my ROM
and that will be within 24 hrs don't worry
EDIT: i canceled the ROM idea
i will only post some development in the forum
There is a standalone mod for extended power menu in the Android Development section. Sorry no link, but it's in the thread title.
I tried this, everything (compiling, recompiling, smali, baksmali) was a success, But Now I dont even have a power menu options dialog. What went wrong ?
Related
Needs: 7zip and Notepad++ (install these to pc)
Porting: (We are porting ROM.zip)
Rom Source: http://forum.xda-developers.com/forumdisplay.php?f=665
Note: You can only port ıcs roms with this method...And this is only for personal using...
1-Dont extract Rom.zip anytime. Only open it with 7zip
2-Download attached keylayout file and extract it. Then delete keylayout folder (\system\usr\keylayout) on Rom.zip and replace new one you extracted...
3-Extract build.prop (\system\) and updater-script(\META-INF\com\google\android\) on Rom.zip
4-Right click extracted build.prop and click edit with notepad++
"ro.product.model=GT-I9000
ro.product.name=GT-I9000
ro.product.device=GT-I9000"
change these lines GT-I9000 to SGH-I897 then save.
5-Right click extracted updater-script and click edit with notepad++
assert(getprop("ro.product.device") == "galaxys" || getprop("ro.build.product") == "galaxys" ||
getprop("ro.product.device") == "galaxysmtd" || getprop("ro.build.product") == "galaxysmtd" ||
getprop("ro.product.device") == "GT-I9000" || getprop("ro.build.product") == "GT-I9000" ||
getprop("ro.product.device") == "GT-I9000M" || getprop("ro.build.product") == "GT-I9000M" ||
getprop("ro.product.device") == "GT-I9000T" || getprop("ro.build.product") == "GT-I9000T");
Delete these lines on top and save.
6-Replace your edited build.prop and updater-script on Rom.zip
7-Replace your favorite modem.bin on Rom.zip
8-Find an Cappy ICS kernel and extract it... Replace boot.img on Rom.zip and delete modules folder (\system\lib\modules\) on Rom.zip and replace with extracted kernel one...
9-Removing front face camera files...
-Delete FaceLock.apk from (\system\apk\)
-Delete pittpatt folder from (\system\vendor\)
-Delete libfilterpack_facedetect.so from (\system\lib\)
-Delete libfacelock_jni.so from (\system\lib\)
10- Deleting unnecessary videos...
-Delete video folder(\system\media\)
11-Changing default lang to english if needs...
ro.product.locale.language=en
ro.product.locale.region=US
Find these lines on build.prop and change (if different) the bold en and US or if you want to change your lang you can write our lang... for example ı want to change turkish and ı must change tr TR...
12- Change DPI to 240 if needs
ro.sf.lcd_density=240
find this line in build.prop and if different then 240, make it 240 for market compatibility...
Finally flash your ported ICS and enjoy it...
PS:If ı helped you then click simply thanks button and maybe you can donate
for future...
And... where do we get ICS SGS ROM from?
I assume from xda Galaxy S?
I mixed it up with Nexus S I think...
bravomail said:
And... where do we get ICS SGS ROM from?
I assume from xda Galaxy S?
I mixed it up with Nexus S I think...
Click to expand...
Click to collapse
pick one from here...
http://forum.xda-developers.com/forumdisplay.php?f=665
can't you use this for any i9000 rom?
The i9000 rom I am using, has an update script without any of those lines....EDIT: which is good because it now works.....
I am guessing that is a lot more complicated to port from Nexus or Nexus S to SGS.
Great guide, thanks! Will try some i9000 ROMs and see how it goes!
popfan said:
I am guessing that is a lot more complicated to port from Nexus or Nexus S to SGS.
Click to expand...
Click to collapse
maybe another day another guide for gnex\nexS...
there are different ways to make it...
1-you can directly compile from rom source with using a linux machine...
2-you can port from directly rom( needs fix RIL,GPS,installation...etc)
umm... how is this different from porting any other rom from i9000? re-oriented kernel & homebutton fix (keylayout). build.prop & install script edit. DONE
and note: this is how to build a "zip rom". *some devs argue if this is even development as it is breaking copyright, unless built from source. but widely found on xda, and not a problem.
TRusselo said:
and note: this is how to build a "zip rom". *some devs argue if this is even development as it is breaking copyright, unless built from source.
Click to expand...
Click to collapse
Stated for personal use, and last I checked its an open forum its not as if the ROMS are being sold
I usually flash the SGS rom first and then replace keylayout and kernel.
Most SGS roms don't have Model-judging-script
As far as I know he is posting these different roms so we can try them out and give feedback on what we and Turk will use as his base to build on.
I for one appreciate the options he is giving us.
Makes me feel like I have a direct say in the development.
Turk has made all of his fans apart of his development team!
Go team TURK!!
This is getting frustrating now, everybody fighting like teenage girls on XDA.
People be mature and solve your problems in PM's rather than in Development Threads.
I really love all the new roms but same rom by different people and then fighting who Ported it [email protected]#[email protected]
When i started out on Xda in end of 2010, roms were few but had quality and some original development and there were also ports but were handled gracefully.
This porting business is getting out of hand now.
Thread cleaned
anishmahadikz said:
This is getting frustrating now, everybody fighting like teenage girls on XDA.
People be mature and solve your problems in PM's rather than in Development Threads.
I really love all the new roms but same rom by different people and then fighting who Ported it [email protected]#[email protected]
When i started out on Xda in end of 2010, roms were few but had quality and some original development and there were also ports but were handled gracefully.
This porting business is getting out of hand now.
Click to expand...
Click to collapse
Actually I rather agree, but you're all fighting like little boys.
This 'I ported it first' stuff has to stop. The guide posted here is fine. The rest of this dreck has been cleaned out. Bans are on the way for those who continue to hosey ports, call names, or otherwise bicker. Grow up.
some one heard me...i think the fights for unofficial porting should stop and people should rather get official ports...now i will be porting all the sgs ports unofficially on my phone woohoo
Wow I never knew that porting roms would be this easy! And I tried it for myself and it's working perfectly! Thanks vibranturk for this great info!
doesn't work for me
try to edit(port) CNA 1.4.0 from http://forum.xda-developers.com/showthread.php?t=1501078
to update CNA 1.3.3 on my cappy but all buttons not working.
parnz said:
doesn't work for me
try to edit(port) CNA 1.4.0 from http://forum.xda-developers.com/showthread.php?t=1501078
to update CNA 1.3.3 on my cappy but all buttons not working.
Click to expand...
Click to collapse
did you change the kernel? you can flash a captivate kernel now buttons will work...
Updated Guide...
Updated Guide...
added 9 and 10... These lines will clean unnecesessary files...
9-Removing front face camera files...
-Delete FaceLock.apk from (\system\apk\)
-Delete pittpatt folder from (\system\vendor\)
-Delete libfilterpack_facedetect.so from (\system\lib\)
-Delete libfacelock_jni.so from (\system\lib\)
10- Deleting unnecessary videos...
-Delete video folder(\system\media\)
How to port any ICS AOSP based roms to your Device (AOKP, CM9 & many other)
- for best compatibilty
--> use same android versions. (4.0.4 -> 4.0.4 example)
--> use latest base from CM9 (is best choose for port) or any AOSPbased ICS ROM
--> use each brand for port (mean Desire HD -> Desire S or other HTC devices). you also can port other roms, but you will have issues.
PORT:
-> download latest cm9 base and extract it
-> download target rom and extract it
for Camera
use Camera.apk from base rom for camera issues fix.
Click to expand...
Click to collapse
copy
/app
/framework
/media
/fonts folders and replace in cm9 folder.
repack your zip and let it boot.
if it doesn't boot then copy /system/lib/libandroid_runtime.so from target rom and repack your rom.zip and install again.. if you get bootloop anyway, then just type in adb "adb logcat" and share it with us in this thread..
if you dont get success dont cry, just try to port another rom you can not port all roms
for HTC Devices
to fix network auto select,
decompile framework-res.apk
go to \framework-res\res\values\bools.xml change
<bool name="skip_restoring_network_selection">true</bool>
to false.
Click to expand...
Click to collapse
to fix graphichal issues,
decompile framework.jar
change these files with cm9 base
smali\smali\android\os
Environment
SystemProperties
smali\smali\android\view
HardwareCanvas
HardwareRenderer$Gl20Renderer
HardwareRenderer$GlRenderer
HardwareRenderer
Click to expand...
Click to collapse
Click to expand...
Click to collapse
enjoy!
if you like this guide, just give 5 stars to thread and click thanks button
hi, there, and i own a huawei u8800, we allready have a aosp ics 4.0.4 aurora room but i would like to have cm9 or aokp into our phone. in this case based is aosp ics aurora and ported will be cm9 or aokp for example? i´m right?
maybe is better port cm9 from desire z to my huawei u8800, since they have the same cpu and gpu.
dont want tou build a rom, just port.
please i need help. thanks anyway.
lol be thankful you have an ICS rom.. Huawei X6 users like me are trying our best to port from u8860's ICS.
I'd like to ask if the method works for a device that does not have official ICS? i.e. porting an ICS rom to official GB?
Kindly advise sir, and thanks again!
I get the same that in miui v4... boot loop and adb says no device
I get AtCmdFwd error.
Could you post the link of latest cm9 base?
im getting stuck in a bootloop...
INFO:
Device-Samsung Infuse
CM9 Base being used to port- http://forum.xda-developers.com/showthread.php?t=1601844
Rom trying to port- http://www.slimroms.com/ (the i9000 version aka galaxy s)
What i did:
1) opened cm9 base with 7zip, deleted app, framework, fonts, media folders
2) replaced deleted folders with app, framework, fonts and media folders from slim ics base 3.6
3) opened up slim ics 3.6 i9000 essentials with 7zip
4)navigated to app folder and moved apks files from ther to the cm9 base - did the same with framework, fonts, and media folders (I did not just copy the folders this time! i only copied the files inside the folders)
5) put zip on sdcard
6) rebooted and started log cat
any help would be apreciated if i dont answer back right away its because i have to pick my sister up from school
Here are the logcats: (All are the same logcat...but two of them are filtered)
I think I kniw what the problem is...gonna attemot a fix after dinner
EDIT i got out of the boot loops and booted into my portes slimics...now to fix the bugs...there is ALOT
thanks for the guide will def give you some credit once i get this stable...may be getting some help from another dev
So as long as the base and ported roms are from the same manufacturer, this will work?
Sent from my LG-E739 using Tapatalk 2
how to port aosp ics to cm9?
good guide
You can add
Copy etc\cron
And etc\init.d files to run RomControl fix
Am stuck at logo screen.
Can't get logcat because ADB can't find my device.
What to do?
Sent from my LG-E739 using Tapatalk 2
mg2195 said:
I think I kniw what the problem is...gonna attemot a fix after dinner
EDIT i got out of the boot loops and booted into my portes slimics...now to fix the bugs...there is ALOT
thanks for the guide will def give you some credit once i get this stable...may be getting some help from another dev
Click to expand...
Click to collapse
Can you please tell what was the problem and how did you fixed? Thanks.
medicjunKie said:
So as long as the base and ported roms are from the same manufacturer, this will work?
Sent from my LG-E739 using Tapatalk 2
Click to expand...
Click to collapse
It would be sane screen res e.g HDPI to HDPI
And also the same processor type too helps
Sent from my LT15i using xda premium
see i hve a question...., what does base mean? does it mean the ics rom which i hve for my device already ported or any ics rom available for my device's manufacturer?
like my phone is samsung galaxy 3....so shud the base be the rom which is available for my g3 or it can be any ics rom like say ics rom for samsung galax s?
---------- Post added at 09:37 AM ---------- Previous post was at 09:36 AM ----------
i m seriously cponfused with that part..... m not gettin g what the base and the rom to be ported shud be?
My logcat ...?? what can i do? http://www.embedupload.com/?d=4HKCKXGIK2
I'm trying to port slimICS and it gets stuck at boot. Here's my logcat if it helps.
http://logcat.miui.us/893012
Zorua said:
I'm trying to port slimICS and it gets stuck at boot. Here's my logcat if it helps.
http://logcat.miui.us/893012
Click to expand...
Click to collapse
see here
Code:
169: E/dalvikvm( 1190): ERROR: couldn't find native method
170:
171: E/dalvikvm( 1190): Requested: Lcom/android/server/PowerManagerService;.nativeStartSurfaceFlingerOffAnimation:(I)V
172:
173: E/JNIHelp ( 1190): RegisterNatives failed for 'com/android/server/PowerManagerService', aborting
baksmali classes.dex of services.jar
find PowerManagerService.smali file in the path com/android/server
add line
Code:
.method private native nativeStartSurfaceFlingerOffAnimation(I)V
.end method
tathanhlam66 said:
see here
Code:
169: E/dalvikvm( 1190): ERROR: couldn't find native method
170:
171: E/dalvikvm( 1190): Requested: Lcom/android/server/PowerManagerService;.nativeStartSurfaceFlingerOffAnimation:(I)V
172:
173: E/JNIHelp ( 1190): RegisterNatives failed for 'com/android/server/PowerManagerService', aborting
baksmali classes.dex of services.jar
find PowerManagerService.smali file in the path com/android/server
add line
Code:
.method private native nativeStartSurfaceFlingerOffAnimation(I)V
.end method
Click to expand...
Click to collapse
I don't have the folder com/android/server/. What am I doing wrong?
EDIT: Wow, I sound so stupid. Nvm, I did that edit. I had to look up smali and baksmali guides. I'll flash it and see if it boots.
Okay, still refusing to boot.
New logcat: http://logcat.miui.us/894002
EDIT 2: Booted but storage isn't working.
Logcat: http://logcat.miui.us/889025
Zorua said:
EDIT 2: Booted but storage isn't working.
Logcat: http://logcat.miui.us/889025
Click to expand...
Click to collapse
Try decompiling the framework-res.apk and change the storage-list.xml in the xml folder.
Hey Guys,
I am using WIUI GB since..very fast and Good Looking ROM,
But only issue is there i can not turn on MUTE option in call
so i have tried all MIUI option but no solution,
i have just checked phone.apk from miui ROM via 7 zip,checked xml files
its saying
turnover_mute_
Click to expand...
Click to collapse
can someone help me on this..how to enable mute in voice call?
Thanks
Anands3 said:
Hey Guys,
I am using WIUI GB since..very fast and Good Looking ROM,
But only issue is there i can not turn on MUTE option in call
so i have tried all MIUI option but no solution,
i have just checked phone.apk from miui ROM via 7 zip,checked xml files
its saying
can someone help me on this..how to enable mute in voice call?
Thanks
Click to expand...
Click to collapse
+1 I have the same issue. When I select mute I get the icon in the status bar but the call doesn't go to mute and other party can hear what ever I can speak.
May be some DEV Help us who can edit apk or xml files
i am sure then mute function will work
hope it helps,
best regards.
yo000
yo000 said:
hope it helps,
best regards.
yo000
Click to expand...
Click to collapse
Actually I dont have PC knowledge i can do only Basic things,
May b this catlog can help any Dev to understand whats wrong here & Why Mute is not working..
Hey DEV please help us
Sent from my MB525 using xda app-developers app
Anands3 said:
Actually I dont have PC knowledge i can do only Basic things,
May b this catlog can help any Dev to understand whats wrong here & Why Mute is not working..
Hey DEV please help us
Sent from my MB525 using xda app-developers app
Click to expand...
Click to collapse
Any one???
Sent from my MB525 using xda app-developers app
Moved to Q&A. Please ask all questions there.
Looking forward for a working Mute Button
I am not a developer but thought will try to digg into this issue as I wanted to move back to MIUIv4 based ROM. Below is my finding which I felt may help developers to pick it up
PhoneUtils.smali of CM7.2
.method private static setMuteInternal(Lcom/android/internal/telephony/Phone;Z)V
.locals 5
.parameter "phone"
.parameter "muted"
.prologue"
PhoneUtils.smali of Pikachu MIUIv4
.method private static setMuteInternal(Lcom/android/internal/telephony/Phone;Z)V
.locals 2
.parameter
.parameter
.prologue
I found few more locations in the file without the word muted in the MIUI smali. I am not even a NOOB on SMALI stuff so looking forward for someone to help here.
EDIT: I tried adding "Phone" and "Muted" parameters but no effect. I think we need to find out the reason for "Error connection: Permission denied" as posted by yo000. Logcat throws the same errors whenever Mute function is engaged.
I m currently on Pikachu Miui That running Great, Best Battery Life,
Every thing works Great But only having mute problem
Sent from my MB525 using xda app-developers app
Found something else today
1. " init: sys_prop: permission denied uid:1000 name:ro.auto_time.startup_synced " error in dmesg every time I try Mute/Unmute -- Does anyone know what is this and how to fix it?
2. Below lines where missing in /system/etc/permissions/permissions.xml file. But no difference even after adding them
" <permission name="android.permission.RAW_AUDIO" >
<group gid="audio" /> "
Finally Working Mute on Defy with MIUI 2.4.20 GB
Finally Mute is working on my Wajk MIUI GB ROM for Defy+.
Replace the libaudio.so file with the attached one and set permission as rw-r--r--.
Thru ADB
Code:
adb push libaudio.so /system/lib
adb shell
su
chmod 644 /system/lib/libaudio.so
ls -l /system/lib/libaudio.so
Above command should display below output.
-rw-r--r-- 1 root root 177624 Feb 29 2008 libaudio.so
Reboot.
The attached libaudio.so is from CM7.2.
The only bug with my MIUI is gone now
thank you for the great info, i want to share my findings. maybe already known, but anyway.
off topic, you can make torch stay on in miui when lockscreen is active, just press power button immediately during the seconds led is on after pressing home, to turn off press again power button then home, works every time in miui spain 2.3.7c mb525/red. maybe works in Pikachu and other flavors.
best regards.
Pio.
As you may know, in stock Samsung ICS ROMs, if you unmount a USB disk connected via USB OTG cable through the unmount notification in the notifications area, you'll be greeted with a UsbStorageUnmountter wakelock, which can only be killed with a reboot. It's a pain in the ass, but here's the fix.
Background of what's happening
When you click unmount, SystemUI calls the com/android/internal/app/UsbStorageUnmountActivity activity
UsbStorageUnmountActivity invokes the intent com.android.internal.os.storage.USB_STORAGE_UNMOUNT which is defined in com/android/internal/os/storage/UsbStorageUnmountter
The UsbStorageUnmountter service is where the wakelock is acquired (and supposed to be released onDestroy(), but never is.
Fix/hack
UsbStorageUnmountter is located in /system/framework/framework2.jar under com/android/internal/os/storage. Open it up.
Remove the wakelock acqusition
Remove the lines in red:
Code:
.method public onCreate()V
...
:cond_20
[COLOR="Red"]const-string v0, "power"
invoke-virtual {p0, v0}, Lcom/android/internal/os/storage/UsbStorageUnmountter;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/os/PowerManager;
const/4 v1, 0x1
const-string v2, "UsbStorageUnmountter"
invoke-virtual {v0, v1, v2}, Landroid/os/PowerManager;->newWakeLock(ILjava/lang/String;)Landroid/os/PowerManager$WakeLock;
move-result-object v0
iput-object v0, p0, Lcom/android/internal/os/storage/UsbStorageUnmountter;->mWakeLock:Landroid/os/PowerManager$WakeLock;
.line 74
iget-object v0, p0, Lcom/android/internal/os/storage/UsbStorageUnmountter;->mWakeLock:Landroid/os/PowerManager$WakeLock;
invoke-virtual {v0}, Landroid/os/PowerManager$WakeLock;->acquire()V[/COLOR]
.line 75
return-void
Remove the redundant wakelock release (probably don't need to do this since it's never called anyway)
Remove the lines in red:
Code:
.method public onDestroy()V
...
[COLOR="Red"].line 91
iget-object v0, p0, Lcom/android/internal/os/storage/UsbStorageUnmountter;->mWakeLock:Landroid/os/PowerManager$WakeLock;
invoke-virtual {v0}, Landroid/os/PowerManager$WakeLock;->release()V
.line 92
invoke-super {p0}, Landroid/app/Service;->onDestroy()V[/COLOR]
.line 93
return-void
Attached is an XWLPX framework2.jar with the above mods. Testing so far has been n=1 (just myself at the moment) so interested in feedback.
jazzk said:
As you may know, in stock Samsung ICS ROMs, if you unmount a USB disk connected via USB OTG cable through the unmount notification in the notifications area, you'll be greeted with a UsbStorageUnmountter wakelock, which can only be killed with a reboot. It's a pain in the ass, but here's the fix.
Background of what's happening
When you click unmount, SystemUI calls the com/android/internal/app/UsbStorageUnmountActivity activity
UsbStorageUnmountActivity invokes the intent com.android.internal.os.storage.USB_STORAGE_UNMOUNT which is defined in com/android/internal/os/storage/UsbStorageUnmountter
The UsbStorageUnmountter service is where the wakelock is acquired (and supposed to be released onDestroy(), but never is.
Fix/hack
UsbStorageUnmountter is located in /system/framework/framework2.jar under com/android/internal/os/storage. Open it up.
Remove the wakelock acqusition
Remove the lines in red:
Code:
.method public onCreate()V
...
:cond_20
[COLOR="Red"]const-string v0, "power"
invoke-virtual {p0, v0}, Lcom/android/internal/os/storage/UsbStorageUnmountter;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/os/PowerManager;
const/4 v1, 0x1
const-string v2, "UsbStorageUnmountter"
invoke-virtual {v0, v1, v2}, Landroid/os/PowerManager;->newWakeLock(ILjava/lang/String;)Landroid/os/PowerManager$WakeLock;
move-result-object v0
iput-object v0, p0, Lcom/android/internal/os/storage/UsbStorageUnmountter;->mWakeLock:Landroid/os/PowerManager$WakeLock;
.line 74
iget-object v0, p0, Lcom/android/internal/os/storage/UsbStorageUnmountter;->mWakeLock:Landroid/os/PowerManager$WakeLock;
invoke-virtual {v0}, Landroid/os/PowerManager$WakeLock;->acquire()V[/COLOR]
.line 75
return-void
Remove the redundant wakelock release (probably don't need to do this since it's never called anyway)
Remove the lines in red:
Code:
.method public onDestroy()V
...
[COLOR="Red"].line 91
iget-object v0, p0, Lcom/android/internal/os/storage/UsbStorageUnmountter;->mWakeLock:Landroid/os/PowerManager$WakeLock;
invoke-virtual {v0}, Landroid/os/PowerManager$WakeLock;->release()V
.line 92
invoke-super {p0}, Landroid/app/Service;->onDestroy()V[/COLOR]
.line 93
return-void
Attached is an XWLPX framework2.jar with the above mods. Testing so far has been n=1 (just myself at the moment) so interested in feedback.
Click to expand...
Click to collapse
I recently purchased a note ,y first samsung and discovered this issue. please explain in more noob details how to make these changes and i will test it. ie do i need root? what software do i make the edits with?
I can't thank you enough, as a regular OTG user this has always annoyed me beyond belief. I will get right to testing this on the JB leak.
Edit:
I have tested this on Jelly Bean XXLSJ and it works. I have attached my file for anyone on the same version.
shadowofdarkness said:
I can't thank you enough, as a regular OTG user this has always annoyed me beyond belief. I will get right to testing this on the JB leak.
Edit:
I have tested this on Jelly Bean XXLSJ and it works. I have attached my file for anyone on the same version.
Click to expand...
Click to collapse
It's
a) sad to hear that the issue is still present in the JB build but
b) good to hear that the fix works in JB too
Devs
Please feel free to incorporate the fix in your ROMS
Mods
I posted this in the Original Development section. For whatever reason it was moved to the General Section. This is an original code fix to resolve a pretty serious issue present in all Samsung ROMs. When I posted this, as far as I could see, the issue had never been resolved at a code level (hence the post in the Original Development section). At the very least please move it to the Development Section or it's at risk of being drowned out and missed amongst the more general posts in the General section
jazzk said:
It's
a) sad to hear that the issue is still present in the JB build but
b) good to hear that the fix works in JB too
Click to expand...
Click to collapse
I know, I lost faith in Samsung fixing this when a family member got a S III and my test showed it had the same wakelock issue.
jazzk said:
It's
a) sad to hear that the issue is still present in the JB build but
b) good to hear that the fix works in JB too
Devs
Please feel free to incorporate the fix in your ROMS
Mods
I posted this in the Original Development section. For whatever reason it was moved to the General Section. This is an original code fix to resolve a pretty serious issue present in all Samsung ROMs. When I posted this, as far as I could see, the issue had never been resolved at a code level (hence the post in the Original Development section). At the very least please move it to the Development Section or it's at risk of being drowned out and missed amongst the more general posts in the General section
Click to expand...
Click to collapse
Thanks for sharing your work
Sent from my Transformer Prime TF201 using xda premium
so this will fix Galaxy s3 not showing up in my computer when connected whereas it is detected by another software?
Sent from my GT-I9300 using xda premium
Fantastic work It's such an annoyance on my SGS3. indie has incorporated this in his ROMs now!
:good:
Thanks for the post, i didn't know there is actually a fix for this. BTW, any idea why is the wakelock acquisition there? I am sure, whoever put it in place had something in mind. I am asking because i am trying to think what possible side effects we may get by removing it.
Also, attaching a windows scripting host .js i've made to automate the patch application, i can easily imagine it being useful for someone. See the js text for more info, it is well-commented.
Thanks again for the post.
By now the quickest way to get the result with minimal hacking is through the Xposed Framework http://forum.xda-developers.com/showthread.php?t=1574401 and the following mod http://www.villainrom.co.uk/forum/threads/usbstorageunmountter-wakelock-instant-releaser.5494/
Only apk's to install, no fiddling :fingers-crossed:
Are SGS3 ROM generally tend to include this framework? I seriously doubt it. Anyway, as you can see from my previous post, decompiling java or even automating the patching process isn't exactly a big deal for me
R: [HOW TO] Fix the USB OTG Unmount Wakelock in Samsung ROMs
Of course it's simple for you but might be complicated for others, not that smart, including myself. Xposed is an apk working on several rooted devices, including the sgs3 afaik, and mods are apk too, noob-friendly.
Sent from my GT-N7100 using xda premium
Does this work for anyone with GS3 I9300? Quite frankly, my battery started draining like mad last night for reasons I couldnt spot on my GSam Battery Monitor that prompted me to purchase Better Battery Stats to only notice I have usb mount/unmount wakelocks and true enough, I unmounted an USB OTG early in the day and a google search let me here! Anyone?
R: [HOW TO] Fix the USB OTG Unmount Wakelock in Samsung ROMs
Why don't give a try to Xposed? Read the instructions, you can always go back with recovery if you have problems.
Sent from my GT-N7100 using xda premium
debernardis said:
Why don't give a try to Xposed? Read the instructions, you can always go back with recovery if you have problems.
Sent from my GT-N7100 using xda premium
Click to expand...
Click to collapse
Thanks but he has noted that its based on AOSP sources and I am on stock sammy so yeah, I doubt it'll work.
R: [HOW TO] Fix the USB OTG Unmount Wakelock in Samsung ROMs
I run stock Sammy here on my note 2, and Xposed works as intended, and, yep, I can mount, unmount a sick and don't incur into the dreaded wakelock
Sent from my GT-N7100 using xda premium
Avoiding the wakelock
Hi all
I am using a stock samsung galaxy tab 2 tablet and I dont intend on rooting the device or installing a custom rom. I have found the dreded wakelock issue and I read that if the usb device is unmounted by going into settings and devices that the wakelock doesnt happen but if its unmounted via the widget in the dock that it would occur. The article said it would be best to disable the usb notification system but I cant see a way of doing this in a stock build.
Please could you confirm if there is anything I can change or do I just have to reboot every time I use a usb device to avoid the wakelock taking hold?
Thanks
Nick
R: [HOW TO] Fix the USB OTG Unmount Wakelock in Samsung ROMs
Only solution I found so far is the one detailed above with Xposed. But it needs root so maybe you better turn your device of after otg.
Sent from my GT-N7100 using xda premium
reverting back to m250s from gt-i9100
i have a problem when reverting my sgs ii.it stuck on T logo when reboot after flashed with odin
please help me what should i do :crying: and thanks before
debernardis said:
Only solution I found so far is the one detailed above with Xposed. But it needs root so maybe you better turn your device of after otg.
Sent from my GT-N7100 using xda premium
Click to expand...
Click to collapse
i just downloaded xposed usbun..apk and wondering if it works on note 10.1 with a rom based on xxcmc5 android revelution hd v6 would you please help me?
i just don't want to mess up with my system and flash the rom again
problem:
with some Play update released, many users are suddenly missing Play icon, and they can still see the app install. so everybody is searching for a custom rom bug which probably is not there or exist in CM10 or simply in Play update.
reason for Play app still being visible as installed is because its updated, but not working so app can be downgraded and play is back in business.
to fix we need a private signed apk until its fixed.
in newest vending.apk released (3.10.10) i get this code in com\google\android\finsky\utils\PackageManagerUtils
.method public static installExistingPackage(Landroid/content/Context;Ljava/lang/StringI
.registers 4
.parameter "context"
.parameter "packageName"
.annotation system Ldalvik/annotation/Throws;
value = {
Landroid/content/pm/PackageManager$NameNotFoundException;
}
.end annotation
.prologue
.line 239
invoke-virtual {p0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
move-result-object v0
.line 240
.local v0, packageManager:Landroid/content/pm/PackageManager;
invoke-virtual {v0, p1}, Landroid/content/pm/PackageManager;->installExistingPackage(Ljava/lang/StringI
move-result v1
return v1
.end method
Click to expand...
Click to collapse
but android/content/pm/PackageManager;->installExistingPackage(Ljava/lang/StringI is nowhere to be found and i did check all packages and framework and specifically framework.jar
have Google released a buggy update? or what? is CM10 just incompatible right now so more and more will need a private signed vending.apk/Phonesky.apk because we cannot update to the google buggy release?
anyone?
i found someone else posting the question on google forums here
edit:
maybe bug relate to this, but not on all devices,
my GNII simply ignore that call and continue updating apps. so sorry, it can just be this bug is supposed to be ignored and something else trigger the problem on many roms currently.
any answers really appreciated.
resolved i believe: dalvik.vm.execution-mode=int:jit
seems to be the bad,bad entry in some builds around!!
so,
everything resovled, it just happens to alot of build that an old entry from 2.2+ still is working and affecting code.