yashsingh1/xdaforums huggingface dataset:
[Captivate Q&A, Help & Troubleshooting] aleadam:
And lastly, the cool hack ;)

--- armani/out/com/android/internal/policy/impl/GlobalActions.smali	2011-02-10 00:17:14.515447002 -0500
+++ latest/out/com/android/internal/policy/impl/GlobalActions.smali	2011-02-04 00:27:42.231980001 -0500

As I said in the Camera.smali post, when the power button is pressed, the camera changes the value of a system setting called camera_in_use from 0 to 1, and reverts it to 0 when the power button is released.

We can read this setting here to decide whether or not to show the power menu dialog (show when zero, do not show when one).

I purposely left the new code at the bottom of the constructor. At first I coded very early in an attempt to make the code a little more efficient, but it would have nasty consequences if the camera was used before the power button was pressed at least once outside the camera app. Something relative to the initialisation of the variables. The code is very straightforward: get the context of the app, get the ContentResolver using that Context, and using

invoke-static {v0, v2, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

to retrieve the value stored.

You can find more info about this here:

http://developer.android.com/reference/android/provider/Settings.System.html

@@ -841,14 +877,49 @@
:cond_1a
invoke-direct {p0}, Lcom/android/internal/policy/impl/GlobalActions;->prepareDialog()V

+ const/4 v1, 0x1
+
.line 115
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mStatusBar:Landroid/app/StatusBarManager;

- const/4 v1, 0x1
-
invoke-virtual {v0, v1}, Landroid/app/StatusBarManager;->disable(I)V

+ const/4 v1, 0x0
+
+ const/4 v4, 0x1
+
+ const-string v2, "****>> GlobalActions <<****"
+
+ const-string v3, "****>> onCreate() <<****"
+
+ .line 105
+ invoke-static {v2, v3}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
+
+ iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
+
+ invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
+
+ move-result-object v0
+
+ .line 106
+ const-string v2, "camera_in_use"
+
+ invoke-static {v0, v2, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
+
+ move-result v0
+
+ if-ne v0, v4, :cond_42
+
+ const-string v2, "****>> GlobalActions <<****"
+
+ const-string v3, "****>> Skipping power menu dialog. Camera in use! <<****"
+
+ invoke-static {v2, v3}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
+
+ return-void
+
.line 116
+ :cond_42
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mDialog:Landroid/app/AlertDialog;

invoke-virtual {v0}, Landroid/app/AlertDialog;->show()V
[Captivate Q&A, Help & Troubleshooting] aleadam:
Bug fix

Yes, the home button hack worked. But only if you did not need to use the power menu or the notification bar... it seems that in the previous hack I did not add a return sentence after the home intent call, so the code went straight to set camera_in_use to 1...

It's a very quick fix that involves adding only two lines of code (marked with a '+', although it's not a real diff):

invoke-virtual {v0, v1}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;

invoke-virtual {p0, v0}, Lcom/sec/android/app/camera/Camera;->startActivity(Landroid/content/Intent;)V

+ const v1, 0x1

+ goto :goto_0

.line 593
:cond_0
invoke-virtual {p0}, Lcom/sec/android/app/camera/Camera;->getApplicationContext()Landroid/content/Context;
[Captivate Q&A, Help & Troubleshooting] MikeyMike01:
That explains it.

Sent from my Captivate.
[Captivate Q&A, Help & Troubleshooting] MikeyMike01:
Got it up and running, but it blew up my power menu.

lolz
[Captivate Q&A, Help & Troubleshooting] MikeyMike01:
I copied the whole .smali file.

So of course the ids changed.

I just copied everything from line 1-800 back over from the original .smali and it's good to go. :)
[Captivate Q&A, Help & Troubleshooting] MikeyMike01:
I added those lines and it still happens. :confused:
[Captivate Q&A, Help & Troubleshooting] aleadam:
first, check the logcat to make sure that is what is going on. If you added all the change I posted in the policy.jar file, then you can do

adb logcat | grep 'Camera'

and see if it's skipping the power menu due to the camera_in_use value (it's very clear from the log)

If so, make sure that you are returning right after starting the intent. The two lines do only one thing: const v1, 0x1 just translates as v1=true; and goto :goto_0 jumps to the :goto_0 label

:goto_0
return v1

so, basically, there's a return true right after

invoke-virtual {p0, v0}, Lcom/sec/android/app/camera/Camera;->startActivity(Landroid/content/Intent;)V

and before

.line 593
:cond_0
invoke-virtual {p0}, Lcom/sec/android/app/camera/Camera;->getApplicationContext()Landroid/content/Context;
move-result-object v0
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
.line 594
const-string v2, "camera_in_use"
invoke-static {v0, v2, v4}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z

The problem before was that the code would still be executed after starting the intent, thus setting camera_in_use=1

Make sure that in your smali file the label is still :goto_0 and not some other label (I don't really know yet how baksmali.jar assigns the names for the labels)
[Captivate Q&A, Help & Troubleshooting] xan:
This is some serious framework hacking going on :D Congrats :)
[Captivate Q&A, Help & Troubleshooting] MikeyMike01:
Okay, so APK Manager was having fits trying to compile those two lines in.

Tried the standalone baksmali, and it spat this out:

classout\com\sec\android\app\camera\Camera.smali [7664,10] Label "goto_0" is not defined.
[Captivate Q&A, Help & Troubleshooting] aleadam:
send me your smali
[Captivate Q&A, Help & Troubleshooting] MikeyMike01:
No problem, I'll post it here tomorrow.

Sent from my Captivate.
[Captivate Q&A, Help & Troubleshooting] MikeyMike01:
Alright, here's the whole smali file set from my Camera.apk.
[Captivate Q&A, Help & Troubleshooting] aleadam:
Try this

http://pastebin.com/CsBbzBKy

Camera.smali
[Captivate Q&A, Help & Troubleshooting] MikeyMike01:
That fixes the Power menu not showing up, but the Notification Drawer still won't work.
[Captivate Q&A, Help & Troubleshooting] aleadam:
That is weird. I had both or none, never just the notif bar. Did you reboot at least once after replacing the apk? Is there anything odd in the logcat?
[Captivate Q&A, Help & Troubleshooting] MikeyMike01:
Here's two logcats. Both starting with the Camera app taking a picture by holding the power button, then hitting home, then trying to open the drawer.
[Captivate Q&A, Help & Troubleshooting] MikeyMike01:
android.policy.jar files.
[Captivate Q&A, Help & Troubleshooting] GizmoDroid:
Ok, I'm officially weirded out. I started hacking the fascinate camera because I had waited and waited and waited for someone else to do it, and no one had. A couple days later, you posted nearly the same hacks that I had came up with, entirely independently. Unknowingly, I then spent a couple hours making a massive post about it, detailing everything you had already done.

At first, I was going to ask if you had looked at my thread as inspiration, but I checked the time stamps and you beat me by 12 hours or so!

My post in the Fascinate Dev forum:

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

Some of the fixes I've been working on and haven't posted yet are almost identical to your's as well.

Apparently, we have the same brain.... get out of my head, man! Haha.

My question is... are we working from the same base file? If so, then I guess I can retire! :)
[Captivate Q&A, Help & Troubleshooting] ngochuy:
can someone please post the version which power button can be used to record video?

Thank you very much
[Captivate Q&A, Help & Troubleshooting] Dave the Knave:
Thread title is pretty self explanatory...

How can I keep these mp3 ringtones from showing up in my media player with the rest of my music? I've tried moving them around. They aren't in the same directory as my music.
[Captivate Q&A, Help & Troubleshooting] alphadog00:
I have mine in the folder:

/sdcard/ringtones/

and they don't show up in media player
[Captivate Q&A, Help & Troubleshooting] Smoghog:
I had the same problem, myself. If I put them in sdcard/ringtones, they would show up in the media player. If I used the .nomedia method, they wouldn't show up as usable ringtones. I ended up rooting my phone, and using root explorer, moved all my personal ringtones to the system directory where ringtones are stored. I also deleted all the stock ringtones while I was in there. No more issues. Now I don't have to scan through a list of ****ty stock ringtones to get to my custom ones, either. =)
[Captivate Q&A, Help & Troubleshooting] TheRomero09:
There is an app in the marketplace called "Media Hidden" should make the process a little bit easier.
[Captivate Q&A, Help & Troubleshooting] Sulphur4724:
I'm reasonably sure that if you make a directory on sdcard media/ringtones the music player will not see them. You can also make a directory under media for notifications for your shorter noises to use with messaging etc to keep them seperate in the dialogs for choosing each type.

If you root your phone you can move them to system/media/ringtones in the root folder.
[HD Mini General] javed_karim:
Hi,

My mini's glass panel (digitizer) cracked. The HTC Customer Care is charging too much for it so I thought of replacing it myself. The problem is I googled and can't find any DIY instuctions. Does anyone know how to replace it?

Has anyone has bought the digitizer from ebay?... please share your experience ... how do you find it compared to the original?

Thanks!
[HD Mini General] deydey:
See here

????://i-thinkbig.blogspot.com/2010/08/htc-hd-mini-changing-touch-screen.html[/url]

attention is glued!

ciao
[HD Mini General] BeemerZ1:
I did this yesterday. Pretty easy if you're patient.

Just remember to not remove the black adhesive round the edge.

And don't touch the LCD... Use gloves!
[XPERIA X1 Q&A, Help & Troubleshooting] henryfranz2005:
hello guys I don't know if hard-spl is already installed in my xperia x1 but I just tried pressing down + power button then 4 color something apperaed then a version with numbers also appeared. Does that mean that hard spl is installed in xperia x1 or not? :)
[XPERIA X1 Q&A, Help & Troubleshooting] sorcerika:
If you installed HSPL, bootloader displays something like this:

KOVS110

SPL-0.72.OliNex

This already posted in HSPL thread.

Why don't you read that thread at first?

PS. I'm poor at English.
[XPERIA X1 Q&A, Help & Troubleshooting] henryfranz2005:
thanks man I just upgraded my rom and yes my xperia was installed with HSPL :) thnks
[XPERIA X1 Q&A, Help & Troubleshooting] Badwolve1:
Q Answered, thread closed and moved to Q&A
[Desire Q&A, Help & Troubleshooting] superdino:
Hi,

I am running the latest DeFrost ROM, which I am happy with.

But I am missing the FM-Radio APP from HTC, which comes in other ROM'S (with Sense).

Is it possible to install this App on DeFrost ROM, as you know?
[Desire Q&A, Help & Troubleshooting] knudsen19:
There's a thread about whether it's posible to port Sense apk's like the Sense FM Radio, Sense phone, camera and etc. to stock android roms, such as Defrost. it's here http://xdaforums.com/showthread.php?t=736211&highlight=sense+contact&page=2
[Galaxy S I9000 Android Development] zulu99:
From last firmware of P1000 i have extract all component for "Ready Hub" and it work very well on galaxy s.

From the P1000 firmware we can take important information and precompiled software for playng 1080p video and for hdmi output.

If the galaxy s is able to output to hdmi we just have a "Portable Google Tv" :)
[Galaxy S I9000 Android Development] ickyboo:
Freakin nice.
[Galaxy S I9000 Android Development] eljelali:
Where did u find it, ive checked on samfirmware but not there..link?
[Galaxy S I9000 Android Development] ethanfel:
It's for the galaxy TAB :)
[Galaxy S I9000 Android Development] Lenunited:
Does it work with the galaxy s?
[Galaxy S I9000 Android Development] jodue:
i guess not out of the box but his point was just to use (port) some of the new software/apps/framework ...
[Galaxy S I9000 Android Development] oswade:
Would be helpful to share the apks...

But I'll have a shot at extracting them myself :)

EDIT: First task, navigating their site to find it T_T

EDIT2: Found it and downloading, but will I be able to extract the firmware -_^

EDIT3: Extracting (well actually converting..) using the ruby script. But it's taking like forever.... been 2hrs already and its still going lol. I guess cause the factoryfs.rfs is ~300 megs!!!
[Galaxy S I9000 Android Development] Unrealwolf:
I hope that Tab`s firmwares will help devs to make 435mb RAM visible for OS in Froyo.
[Galaxy S I9000 Android Development] ginkage:
It's strange, but JIT is disabled in this firmware... Just like in all previous ones (JH8, JHA, etc.).
[Galaxy S I9000 Android Development] mazsuper:
This is so cool, awesome work dudes, lets have those APK's :)
[Galaxy S I9000 Android Development] laggedHero:
No JIT yet? So strange.

I'm dying to try this FW on my Galaxy... just have to learn how to cook it up!

---

I got it.

I can see all the APK's and so. I'll try installing later... should I worry about the .odx file? (OK, I don't really remember the extension...)

Anyway, gonna backup everything.. just in case.

---

A simple install of Reader Hub didn't work. :/
[Galaxy S I9000 Android Development] zulu99:
open factoryfs.rfs

for open factoryfs.rfs in linux you can probe with this command:

mount -o loop factoryfs.rfs /some_dir

"Ready Hub work very well in galaxy s"

I hope for hdmi output and 1080p video playback on galaxy s.

memoria aumentata lag fix e altro le svilupperà samsung, ma queste due potenzialità che il nostro processore già supporta samsung ce le regalerà solo con i prossimi telefoni "a pagamento" se non le estraiamo noi dal galaxy tab

please translate the last message

update: there is new firmware P1000XXJI3 in fus.samsungmobile.com look this twitter.com/SamsungFUSNews

the Model: SC-02B i think is a galaxy s in google search: galaxy s SC-02B tehere is firmware SC02BOMJI2 "september firmware" i think is froyo
[Galaxy S I9000 Android Development] oswade:
OH!! good find! Seems SC-02B is the Japanese Galaxy S!?

http://memn0ck.com/blog/2010/08/nttdocomosamsunggalaxyssc02bwifi.html

It has flash too!!! (from the picture).

If anyone wants to request it...

http://www.modaco.com/content/i8000...41/samsung-mobile-firmware-queries-downloads/

Although I wouldn't be surprised if it spread soon via samfirmware etc...

(I might be jumping to conclusions here guys, zulu99 has got me excited ^_^)

EDIT: Although I found some specs which list 2.1 for SC-02B. Might be old though.
[Galaxy S I9000 Android Development] Richthofen:
Docomo SC-02B roms have been Froyo since JH6 buid.

The newest build is JI2.

They get more updates than we do for I9000 :mad:
[Galaxy S I9000 Android Development] oswade:
:mad: Thats really weird... I know japan is close to korea but even samsung korea hasn't released any froyo firmwares yet (right?).

Japan gets more updates than the rest of the world (international i9000), thats crazy.

Richthofen: do you know if the roms are compatible though?
[Galaxy S I9000 Android Development] ^Sbk79^:
Means:

Increased memory, lag fix and other things will be developed by Samsung. But these two features, already supported by our processor, will be gifted to us by Samsung only on new devices that they are going to market next, unless we will extract them from Galaxy TAB by ourselves.

More or less.
[Galaxy S I9000 Android Development] Lalaca:
The prospect of a Japanese Galaxy S (or at least, the firmware from one) excites me. With Galaxy on Docomo, and Desire on Softbank, perhaps we'll finally see Android-native input methods for Japanese that can be ported to other devices. Plus more developers from that area.
[Galaxy S I9000 Android Development] laggedHero:
Samsung will work on memory and lag fix, but 1080p and HDMI only for new devices??

:/

A good thing Galaxy Tab is so close to Galaxy S.
[Galaxy S I9000 Android Development] kiteretsu:
(Leak photo)

ttp://juggly.cn/archives/8872.html

As for SC-02B of Japan, the specifications are more different than international versions.

For docomo's FOMA plus area(UMTS800) frequency

The setting　menu changes clause several for docomo.

There is no FM radio.

There is no MobileAP.

The application program of the career adds it. Game and digital book, etc.

The shutter tone of the camera cannot be erased.

etc...
[Galaxy S I9000 Themes and Apps] DaRkMyk:
NOTE: Only Singapore Map is available, for the time being.

I just checked my Samsung Apps, there's a new app called NAVFone.

After installation & running for the first time, it'll download the maps & other data (59Mb). I think it's only available for Singapore, Malaysia, Indonesia and Philippines...

..Well it is not Google Maps but you can use it offline so +1 to that

EDIT: Attached the apk file, hope it'll work for everyone.

Double EDIT: Attached the downloaded data files (Singapore MAP only), just extract & place it on /sdcard/navfone

NavFone 2.0.271 update Oct-06-2010!

apk file: http://www.sendspace.com/file/z67jvi

Data files : http://www.sendspace.com/file/pt76bu

To fix FC issues:

Follow the instruction given by Seifer1975

http://xdaforums.com/showthread.php?p=8345758#post8345758

Tested by: hazeline

http://xdaforums.com/showpost.php?p=8371072#post8371072
[Galaxy S I9000 Themes and Apps] SysTem-X:
Don't see it in Malaysia =(
[Galaxy S I9000 Themes and Apps] Seifer1975:
Cool! Just downloaded. Trying now.
[Galaxy S I9000 Themes and Apps] cosmoboi:
It only for v2.1 nia... Froyo not yet leh
[Galaxy S I9000 Themes and Apps] sorna:
I am from Malaysia and on 2.1. But I am unable to see it. :-(.
[Galaxy S I9000 Themes and Apps] oswade:
Didn't show up on my samsung apps (eclair JG4 australia). I'm guessing it's location specific then as you say :) Wouldn't mind some free (and legit) nav software lol.
[Galaxy S I9000 Themes and Apps] FITRS:
Any chance you guys who have it upload the apk file somewhere? Thanks.
[Galaxy S I9000 Themes and Apps] iqbalbaskara:
not available in Indonesia I think, can't find it.
[Galaxy S I9000 Themes and Apps] Seifer1975:
Still preferred ndrive. UnInstalled
[Galaxy S I9000 Themes and Apps] felixkh:
Thanks. I accidentally deleted my icon and could not redownload from Samsung Apps. You did me a favour.
[Galaxy S I9000 Themes and Apps] Seifer1975:
This app doesn't reappear in the samsung app store after uninstallation. Using the attached apk always fc during data downloading.
[Galaxy S I9000 Themes and Apps] mengsuan:
I'm using Singtel i9000 but couldn't see the app. Good post.
[Galaxy S I9000 Themes and Apps] SwiftPolar:
I think you're supposed to use Kies to get it downloaded. Otherwise it can be found at their samsung store (not the app) the website itself, samsungapps.com/
[Galaxy S I9000 Themes and Apps] DaRkMyk:
I'll try to upload the downloaded files later when I get home.

UPDATE: just attached the downloaded files.. (on my first post) only Singapore Map though...

Sent from my Samsung I9000 Galaxy S.
[Galaxy S I9000 Themes and Apps] DaRkMyk:
lolz.. because you removed the app.. maybe it has some hard feelings! :D
[Galaxy S I9000 Themes and Apps] John_1972:
Hi I too having same problem. I deleted the navfone but not able to install back. I coudn't find from market. Can anyone help me? I can see there is nafone folder under my files

Tks
[Galaxy S I9000 Themes and Apps] DaRkMyk:
did you try to install using the attached .apk? what is the error message?
[Galaxy S I9000 Themes and Apps] John_1972:
Hi,

Thanks. I just downloaded from the link given by you. Does it requires Kies to paste the .apk file into my sd folder. I checked the navfone all files still inside my folder except the .apk file. Does it sove my problem to getting back the icon?

Tks
[Galaxy S I9000 Themes and Apps] s88:
can you provide the maps for malaysia as well?
[Galaxy S I9000 Themes and Apps] DaRkMyk:
you can send the .apk via bluetooth or via USB mass storage or kies..

then browse the phone and install using a file manager like EStrongs File Explorer or ASTRO File Manager
[Galaxy S I9000 Themes and Apps] DaRkMyk:
Sorry I don't have them. I just uploaded the map that my phone downloaded.

maybe it is still not available..
[Galaxy S I9000 Themes and Apps] John_1972:
Hi,

Installed the .apk file and able to find the icon. But I tested my phone the GPS connection not able to establish > 20 mts. I travelled all the way back to my home from office the N avfone still searching for the GPS locality (The GPS logo in the home sreeen just blinking).Wonder others also having this problem?

John
[Galaxy S I9000 Themes and Apps] Seifer1975:
This app is quite crap btw. It can tell me to turn left at a junction, then immediately tell me to turn right at the same junction. Seems that it is always trying to recalculate the route, even if I did not deviate.
[Galaxy S I9000 Themes and Apps] DaRkMyk:
Are you also from Singapore? I haven't experienced that, I usually get GPS lock immediately.

Yeah, it still needs a lot of improvement!
[Galaxy S I9000 Themes and Apps] melvinchng21:
Hi, I've installed the .apk file and saw the Navfone icon in my menu. However, when I launch it, , "Downloading data" came on my screen then "Sorry, The application NAVFone (process.com.sg.agis) has stopped unexpectedly. Please try again" came up.

Can anyone advise on what I can do to make it work? Was previously using NAVFone on my Omnia II, it worked perfectly. Now on SGS really need the voice navigation urgently.

Thanks.
[Galaxy S I9000 Themes and Apps] John_1972:
Yes I am from Singapore. After I changed few settings it is working noe. But I haven't tested fully. Thanks
[Galaxy S I9000 Themes and Apps] hazeline:
Same Experience

I am also having the same problem.. has anyone solved it yet? Thanks! :)
[Galaxy S I9000 Themes and Apps] Adevem:
i'm just wondering for users in Singapore. is the gps working for you guys? i get locks fairly quickly and accurately but once i start moving, it's really jumpy and most of the time the arrow doesn't even move with me.

lol. for those of you with good GPS regarding locks/movement, what rom are you on? I'm personally on JPK.

also, any good navigation applications to share other than NAVFone?

thanks guys!
[Galaxy S I9000 Themes and Apps] reaper1412:
Same here. . .

whats the problem?

i'm from indonesia
[Galaxy S I9000 Themes and Apps] X3STeNLiTE:
can I download more country?
[Galaxy S I9000 Themes and Apps] DaRkMyk:
Did you transfer the downloaded data that I attached?
[Galaxy S I9000 Themes and Apps] hazeline:
Yes i have moved it into the memory area of the phone itself, not into my sd card. I am current using the official firmware by Samsung, is it something related to it?
[Galaxy S I9000 Themes and Apps] DaRkMyk:
I'm also using the official firmware & not rooted. Just make sure that it is in the correct path(unzipped) as I stated on my first post. Other than that, I don't know anymore.

Sent from my Samsung I9000 Galaxy S.
[Galaxy S I9000 Themes and Apps] hazeline:
Hmmm.. i suspect that maybe because due to wifi or data plan usage to download the maps? Still i find it wierd that some people can work, some cannot work.. Thanks anyway :) u r also from Singapore?
[Galaxy S I9000 Themes and Apps] DaRkMyk:
The data file that I attached is supposed to bypass the downloading. hmm.. re-installing maybe? Hope you can fix it.

I'm from the Philippines & currently here at Singapore.
[Galaxy S I9000 Themes and Apps] Seifer1975:
The FC seems to be a problem when it's trying to download the first file, which is headerFile.txt. If you get the downloaded package posted by the OP, it contains the headerfile.txt. What you can do is to copy the file over to /sdcard/navfone and your download process will be okay after that. Alternatively just have to copy all the downloaded stuff posted, into /sdcard/navfone and you are good to go.