yashsingh1/xdaforums huggingface dataset:
[Galaxy S II Original Android Development] Robse86:
Hey Tungstwenty,

so I played around with setting up my own gestures and finished so far, quite nice :). I have another question though about your code. There is the following problem:

For exampe, Im using app1 and app2. Switching between both of them works fine. Now if I go to the launcher/mainscreen, switching doesnt work anymore. By doesnt work anymore I mean, that if I go back to the launcher from app1/2, the switching gesture switches now between the launcher and app1, not between app1 and app2 anymore. To fix this I have to open app1/2 and then open the other app with the recent app launcher. After doing that the "two app switch" works fine again.

Im not a dev, but from the logic I would guess that the code doesnt recognize, or more specific, doesnt make a difference between the kind of an app, right?

So here is finally my question.

Would it be possible to change the code to exclude the launcher and take the "third" app(3) incase. This would make this gesture perfect! If its not possible to make this variable then would it be possible to define the ignoring app? In my case Apex Launcher.

Thank you n greets
[Galaxy S II Original Android Development] Tungstwenty:
I have just updated the 3rd post with all the actions that have been discussed so far (I think), along with explanations behind each one.

Thanks for the suggestion. I included it in the 3rd post; you'll find there the solution for the case where you want to skip a launcher package and activate the app before that one.
[Galaxy S II Original Android Development] Many40:
I tried to find proper service codes to toggle GPS on/off but unfortunately without success at the end. What I found out is:

1. Avalable service in our phone to be used with "service call" command is:

location: [android.location.ILocationManager]

2. Within an interface "ILocationManager" didn't find any suitable transactions which could toggle GPS on/off.

3. I found possibly suitable transactions for that: "TRANSACTION_enable", "TRANSACTION_disable" and "TRANSACTION_getStatus" but they are from another service:

location: [android.location.ILocationProvider]

which is unfortunately not supported in our phones by "service call" command (not on the "service list"). Regards
[Galaxy S II Original Android Development] Tungstwenty:
I searched the web and the APIs and also found those.

However, it doesn't look like it's possible to activate GPS programmatically any longer.

ILocationProvider is the interface for location providers that are implemented as independent services, which is not the case for our device. Instead, they are loaded in the same process as the location manager and therefore not accessible externally since ILocationManager doesn't include a way to propagate requests to each provider.

The closest thing would be the sendExtra transaction, but that doesn't allow enabling/disabling a provider. All the GPS provider accepts are the settings "delete_aiding_data", "force_time_injection" and "force_xtra_injection" which are useless.
[Galaxy S II Original Android Development] asaf-g:
"SecureSettings" Tasker plugin has a way of doing that with a small apk in the /system partition.

Might be worth a try to ask these guys if you can use their solution in your case.
[Galaxy S II Original Android Development] Tungstwenty:
I imagine that with actual coding (which requires an apk, yes) it is probably doable.

If it already exists, you'll only need to start an intent (am start ...) to tell tasker to call that plugin, or launch whatever app that will do it.
[Galaxy S II Original Android Development] Musko:
Scaling Max Frequency

Hellou Tungstwenty,

I have one question. Is any way to change with your gestures in Omega ROM V13 (ICS) and SiyahKernel S3 v1.5.1 Scaling Max Frequency what I may change via STweak app?

When is possible, please can you show how it?

Thank you.
[Galaxy S II Original Android Development] Tungstwenty:
Sure, you can do pretty much anything that STweaks does - you just need to know which "echo xxx > /sys/...." commands to execute.

For that, you can open the /res/customconfig/customconfig.xml file in a text editor and browse the entries to find which is the /sys/... file for each setting you want.

Example (for my S2, but it should be the same on S3):

<seekBar description="Scaling maximum frequency (Samsung default: 1200000)" name="scaling_max_freq"
action="generic [COLOR="Red"]/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq[/COLOR]"
unit=" kHz" min="100000" reversed="false" step="100000" max="1600000"/>
<seekBar description="Scaling minimum frequency (Samsung default: 200000)" name="scaling_min_freq"
action="generic /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq"
unit=" kHz" min="100000" reversed="false" step="100000" max="1600000"/>

Therefore, if you wish to have a gesture set the max frequency to e.g. 800000, you just need to have it run this:

echo "800000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

There are many more entries under /sys that can be changed and aren't even in the Ex/STweaks configurations, such as the current state of the mDNIe inverted colors (not the shortcut enabled/disabled). See the example in the 1st action, which reads the current state of the screen and toggles it between normal -> inverted -> normal.

Note that this kind of stuff is only kernel-dependent, the ROM is irrelevant since the settings of governor, frequencies, etc. are handled directly by the kernel.

I'll throw in a couple of examples more on the 3rd post when I have some time.
[Galaxy S II Original Android Development] switchgott:
Hi,

is it possible to activate the screen (power on button) if i disable it (power off) ?

It works to get the display off, but to get it on?

What i have to do?
[Galaxy S II Original Android Development] Tungstwenty:
The action to turn it on would be the same, just simulate the "Power" key.

There's a detail, though - gestures aren't detected when the device is off. It's saving power, including the one that the screen drains when detecting touches.

Since touches are not processed during screen off, there are no gestures that can awake the phone :)
[Galaxy S II Original Android Development] switchgott:
THanks for replay!

But every time i change a line, the gesture doesnt work anymore .-((

Als my settings are not insert.

What iam doing wrong?

I guess i could change the gesture paramter also?

Or can i change only the trigger?
[Galaxy S II Original Android Development] Tungstwenty:
Both of you are likely to be having the same issue.

Are you changing the script using a Linux end-of-line aware editor?

The lines must be terminated only by a 0x0A control char, not by 0x0D + 0x0A like "windows" text files.

Use for instance Notepad++ or some other editor that has that capability, and even then make sure to look in the appropriate option so that the saved file keeps using only linux terminators.

You can change both, of course.

Just use the examples and imagine the coordinates, in order to design the touch point sequence to the paths you want.

Just make a copy of my zip, update the /system/etc/init.d/S50... file with your own, and flash the changed zip. It will do the installation just like before, but using your script (provided you keep the same filename).
[Galaxy S II Original Android Development] Mahdi786:
Hi, does brightness up/down 212/213 work for anyone? I can't get it working, I tried "input keyevent 212" in terminal but nothing happens
[Galaxy S II Original Android Development] Chillmann:
At first, Thank you Tungstwenty for really quick reply, now i can modify ur sample script to my needs :good:

Not working for me either. Got my modified script working but not with brightness up/down. I did a test with keyevent 4 (back key) which worked, but no effect with keyevent 212/213

Also the given reference from post #3: http://grepcode.com/file/repository.../4.0.3_r1/android/view/KeyEvent.java#KeyEvent for ics

and http://grepcode.com/file/repository.../4.1.1_r1/android/view/KeyEvent.java#KeyEvent for jb

doesnt state a brightness up/down keyevent. The ics reference ends with keyevent 210 and the one for jb says for keyevent 212:

"public static final int KEYCODE_EISU = 212;

Key code constant: Japanese non-conversion key."

and for keyevent 213:

"public static final int KEYCODE_MUHENKAN = 213;

Key code constant: Japanese conversion key."

Going to try a workaround using tasker for this job. Still curios who came up with this keyevents for brightness up/down. Do they exist at all?
[Galaxy S II Original Android Development] houssam10001:
how to activate slide2wake in Siyah Kernel ?
[Galaxy S II Original Android Development] Chillmann:
get fluxi kernel :banghead:
[Galaxy S II Original Android Development] Tungstwenty:
Someone mentioned it previously on the thread and I added it to the list.

It does work for me - stock 4.0.3 (XWLPG). I guess it's really ROM-dependent.
[Galaxy S II Original Android Development] Chillmann:
Got it working using Tasker but as expected it reacts very delayed.
[Galaxy S II Original Android Development] Mahdi786:
Hi Tungstwenty, is there a way to restart the script other than rebooting the phone?
[Galaxy S II Original Android Development] Tungstwenty:
Yes there is.

Open a shell and type the following "ps" command:

# [COLOR="Red"]ps -l | grep cat[/COLOR]
S 0 [COLOR="Green"]11206[/COLOR] [COLOR="green"]11205[/COLOR] 1892 204 0:0 18:19 00:00:00 cat /sys/devices/virtual/
S 10028 13455 1867 297m 41120 0:0 18:50 00:00:01 {LocationService} com.goo
S 1000 14034 1867 280m 35016 0:0 19:07 00:00:00 {.MtpApplication} com.and
S 0 14603 14553 1896 232 pts0 19:53 00:00:00 grep cat

The green values are the ones we need (it changes every time).

Just out of curiosity, you can check what is the "parent process" doing:

# [COLOR="Red"]ps | grep[/COLOR] [COLOR="Green"]11205[/COLOR]
11205 root 1904 S {S50GestureActio} /sbin/busybox sh /system/etc/init.
14596 root 1896 S grep 11205

Yup, makes sense :)

Ok, we only need to kill the 2 processes:

# [COLOR="Red"]kill[/COLOR] [COLOR="green"]11205 11206[/COLOR]

Done, no more gesture detection.

If you want to launch it again, perhaps after modifying the script, just launch it from the shell and it will start running on the background.

# [COLOR="red"]/system/etc/init.d/S50GestureActions[/COLOR]

(or whatever is the name / path of the script you want)

Checking again if it's running...

# [COLOR="Red"]ps -l | grep cat[/COLOR]
S 1000 14034 1867 280m 35016 0:0 19:07 00:00:00 {.MtpApplication} com.and
S 10028 14849 1867 293m 40712 0:0 20:00 00:00:01 {LocationService} com.goo
[COLOR="Green"]S 0 14910 14909 1892 204 pts0 20:00 00:00:00 cat /sys/devices/virtual/[/COLOR]
S 0 14929 14553 1896 232 pts0 20:01 00:00:00 grep cat

All done.

(this last step isn't needed, it was only for illustration)
[Galaxy S II Original Android Development] Mahdi786:
Hi Tungstwenty, if you and Gokhan can port the slide to wake feature from fluxxi's kernel we wouldn't have to use our hard keys at all :)

I got the long power button press working with your tips on the first page, thanks. I just have to find the correct keyevent list for jellybean.
[Galaxy S II Original Android Development] Tungstwenty:
I'm not so sure it will be a good idea, because the touch sensor will have to be powered even when the screen is off, causing continuous battery drain.
[Galaxy S II Original Android Development] Mahdi786:
ok, thanks
[Galaxy S II Original Android Development] ksilver89:
To kill the script, I simply add another gesture to use the "break" command, with small vibration, very quick and easy when testing stuff out.
[Galaxy S II Original Android Development] lakicamm:
Hi guys, i'm using gestures implemented in dorimanx kernel, i even managed to set some of my own, but my knowledge is limited when it gets to new actions.

I was wondering if its possible to set a torch on/off, if anyone knows how to do that that would be great :)
[Galaxy S II Original Android Development] Flint2:
Install a free app from the market, set it to torch on on start, and define the action with am start

Sent from my GT-I9100 powered by Dorimanx kernel and Resurrection Remix Jelly Bean
[Galaxy S II Original Android Development] Gammelgustav:
Anyone can do an iCrap-like Gesture script?

(4 fingers pinch for Home etc.)
[Galaxy S II Original Android Development] karlesg:
I think a 3 fingers pinch is more easy and practical to achieve on a 4.3" screen and the definition of the gesture should be something like this

# Gesture 9 - swipe 2 fingers from near the top to middle and 1 finger from near the bottom to middle
9:1:(0|480,0|200) 9:1:(0|480,200|600)
9:2:(0|480,0|200) 9:2:(0|480,200|600)
9:3:(0|480,600|800) 9:3:(0|480,200|600)

If you really want a 4 fingers pinch (3 fingers from top to middle and 1 from bottom to middle) then the gesture should be

# Gesture 9 - swipe 3 fingers from near the top to middle and 1 finger from near the bottom to middle
9:1:(0|480,0|200) 9:1:(0|480,200|600)
9:2:(0|480,0|200) 9:2:(0|480,200|600)
9:3:(0|480,0|200) 9:3:(0|480,200|600)
9:4:(0|480,600|800) 9:4:(0|480,200|600)

and for triggering the action you should add this

elif [ "$GESTURE" == "9" ]; then

# Press Home button
input keyevent 3

p.s. All the copyrights belong to Apple!!! (Honestly I don't have 1 billion dollars to pay them if they sue me! :silly: )
[Galaxy S II Original Android Development] Gammelgustav:
First of copy-rights and second coz I like it more I would choose your 3-Finger pinch :P
[Galaxy S II Original Android Development] rakeshishere:
Anyone saw this app for nexus?

https://play.google.com/store/apps/details?id=net.ponury.pgm2free

I wish someone made a similar one for siyah kernel for touch gestures. ;)
[Galaxy S II Original Android Development] houssam10001:
+1
[Galaxy S II Original Android Development] Bialy788:
I've flashed the sample script over Siyah 4.1.1 but only mDNIe gesture works and ALL other gestures don't work !

what wrong have I done ?
[Galaxy S II Original Android Development] Flint2:
GUI Front end for editing gestures

Does any dev started developing a GUI front end app for editing gestures?

If so anybody can post the link to xda or github if available.

I'm planning to start developing for android and i think this is a good start point:

app: Multitouch Visible Test (Google Play link)

source code: http://www.rbgrn.net/content/367-source-code-to-multitouch-visible-test
[Galaxy S II Original Android Development] hawkerpaul:
For those of you who use QuickPic, the following will open up the galleries:

am start com.alensw.PicFolder/.GalleryActivity

I would be interested if anyone knows how to open up a specific gallery from the command line.

I've tried the following, none of which work:

am start com.alensw.PicFolder/.GalleryActivity Camera

am start com.alensw.PicFolder/.GalleryActivity /sdcard/external_sd/DCIM/Camera

am start com.alensw.PicFolder/.FolderActivity Camera

am start com.alensw.PicFolder/.FolderActivity /sdcard/external_sd/DCIM/Camera

Any ideas would be very much appreciated.

You can get quickpic to create a shortcut on the desktop to a specific gallery folder, so is there any way of interrogating a homescreen icon's properties perhaps?
[Galaxy S II Original Android Development] Tungstwenty:
You can use the Intent Intercept app to inspect the data you need for the "am start" command.

After activating it, whenever you launch something form an icon, you'll be prompted about which app you want to handle it, and if you choose Intent Intercept it will display the action (-a), data (-d), etc. which you can pass to the am command.
[Galaxy S II Original Android Development] hawkerpaul:
Intent Intercept does not seem to work for me.

It installed ok, but it doesn't intercept any icon click, even though I have "Enable interception" set to "On"

It doesnt give me the option to choose the app. The icon's app just launches as normal.
[Galaxy S II Original Android Development] Tungstwenty:
Mmmm, it works for me...

Nevertheless, here's another way ;)

Use an SQL editor to open the launcher's database, which will be at "/data/data/com.sec.android.app.twlauncher/databases/launcher.db". Open the "favorites" table and fetch the intent data from the entry you want.

If you're using a different launcher, chances are you can do something similar. Otherwise just open TWLauncher temporarily, create the shortcut you want, and fetch the data.
[Galaxy S II Original Android Development] hawkerpaul:
Thanks for all your help on this mate.

Still cannot get a result however. :(

I can't open the launcher.db file. It says its malformed. I'm on Apex.

I get the same error on TW's launcher.db file.

I tried both sqlite3.exe and also opening the .db in DroidExplorer's SQL tool

I found a google_analytics.db file in the Apex data folder, and this opens fine with both utilities. I just can't open any launcher.db it seems.

Can someone on QuickPic create a homescreen icon to the Camera folder and find out what this shortcut is for me please?

Thanks
[Galaxy S II Original Android Development] Tungstwenty:
Here you go.

Perhaps you needed to try a different SQL app (?)

I'm guessing you were missing the "-d ..." part. Also, if the action is not VIEW (and instead is the default, MAIN, with cat LAUNCHER), the app will ignore the data parameter even if supplied.
[Galaxy S II Original Android Development] hawkerpaul:
Thanks so much mate, that did the job!

Strange how 2 different tools failed to open both Apex and TW launcher.db's, and strange how intent intercept was not intercepting any shortcut click though.

Thanks mate.

:good:
[Galaxy S II Original Android Development] Mahdi786:
Hi Tungstwenty, is there a way to do a single key press with sendevent? I find that input keyevent 3 and 26 stops working randomly on jellybean

Edit: I googled a bit and this works for a single press on the power button

sendevent /dev/input/event1 1 116 1

sendevent /dev/input/event1 1 116 0

sendevent /dev/input/event1 0 0 0

Just to confirm sendevent works a lot faster than input keyevent and volume up and down work as well on jellybean.
[Samsung Galaxy Nexus] Nightwish sgsl:
Hi. My gnex is sprint. I am on 4.0.4 aokp rom with trinity kernel. I cant play Modern combat 3 ..everytime i get MC3 stopped working ..what to do?
[Samsung Galaxy Nexus] Alton (Halo 2):
Turn off WiFi and when it enters menu go out and put it back on
[Samsung Galaxy Nexus] miketoasty:
I have been in contact with Gameloft since April and they have yet been able to fix the issue. They have given me an updated apk every month but none of them have ever worked.
[Samsung Galaxy Nexus] Alton (Halo 2):
Yea and I get crazy lag with this game too.
[Samsung Galaxy Nexus] Zeinzu:
Plays fine here. Stock AOSP 4.1.1 build JRO03L.

Sent from my AOSP Android 4.1.1 Galaxy Nexus
[Motorola Photon 4G] keljoe2804:
This is the recent thread I posted on Android Forums maybe someone here could help me.

thanks

Keljoe2804

New Member

Thread Author (OP)

Join Date: Aug 2012

Posts: 3

Device(s):

Thanks: 1

Thanked 0 Times in 0 Posts Photon unique issue

--------------------------------------------------------------------------------

Hey guys, sorry if this is a repeat, but i cant find anyone else with this problem.

a while back i tried to root my phone a few different ways. I tried the torpedo, one click and some other way. I think i got a partial root some how cause i have access to all my root files through file manager, but no apps recognize root. There is no su binary, no busy box and no sudo is what my root checker says. Ive tried rsd lite 5.6 but there is a re-enumeration issue. I cant get back to stock. Everything works fine except normal wear and tear things. Ive tried different usb ports, i made sure the file im flashing is in the root of my c drive. Not sure what to do. Any help would be great.

Thanks in advance.

Sponsors

August 10th, 2012, 11:42 AM #2 (permalink)

Citizen Coyote

Member

Join Date: Aug 2011

Location: Austin, TX

Posts: 422

Device(s): Motorola Photon 4G (rooted), HTC Evo 4G (sold)

Thanks: 131

Thanked 170 Times in 109 Posts

--------------------------------------------------------------------------------

What software version are you running? What were you running when you tried to root your phone the first time? If you had 2.3.4, Shabby's AIO should have worked assuming you followed the directions. If you're on 2.3.5 now, you can try Mof's new Photon-Torpedo Direct.

Good luck!

The Following User Says Thank You to Citizen Coyote For This Useful Post: Keljoe2804 (August 10th, 2012)

August 10th, 2012, 12:18 PM #3 (permalink)

Keljoe2804

New Member

Thread Author (OP)

Join Date: Aug 2012

Posts: 3

Device(s):

Thanks: 1

Thanked 0 Times in 0 Posts

--------------------------------------------------------------------------------

Awesome I'll give it a try thanks.

August 10th, 2012, 02:19 PM #4 (permalink)

Keljoe2804

New Member

Thread Author (OP)

Join Date: Aug 2012

Posts: 3

Device(s):

Thanks: 1

Thanked 0 Times in 0 Posts

--------------------------------------------------------------------------------

I wasn't successful. It gave me the error like it said but no # it went back to the $.
[Motorola Photon 4G] yairku:
What about installing SuperUser? Did you think of that point? :)
[Motorola Photon 4G] keljoe2804:
yeah, I've tried it installed and uninstalled.
[Motorola Photon 4G] yairku:
To gain root access, you must have this app, and when you try to use an app that requires root access and you see a popup, select "allow".

If you uninstalled it, you can't have root access. You should root your Photon and install Super User.
[Motorola Photon 4G] keljoe2804:
thats the problem, not sure whether I'm rooted or not, lol. cause I can't root or unroot my phone, I'm trying to get back to stock so I can either send in for warranty or reroot.
[Motorola Photon 4G] keljoe2804:
The other thing is I did the OTA to 2.3.5. which should've knocked out my root access if I was rooted in the first place, but I run into different errors while trying to root, I don't have su binary, I get errors like permission denied on certain files when trying to the root through command prompt either the photon-torpedo or the one click stuff. Not sure what I'm going to do, need to get a new phone under warranty so I can start over on this whole thing, but just can't get back to stock. Is there a way that I can completely wipe my phone to where I can reload everything so there would be no trace of defective files?
[Motorola Photon 4G] yairku:
I don't think you should reload everything.. There's no point in doing that unless you're sure you have a big problem.

Now that you have 2.3.5, you can't unlock the bootloader and flash custom ROM, unless you use bootstrap, that gives you the ability to flash a little amount of ROMs.

Just try to root your Photon using the old method. My favorite guide of rooting, (used it after every SBF) is here. It even prevents the permission denied problem!!

Please try this guide, I'm pretty sure that it'll solve the problem.
[Motorola Photon 4G] mof9336:
Does your 4g work?

The above methods won't work. The phone won't take shell commands. There is no /lib directory. I've seen this before actually I'm there myself now I had to use the ota update files to get out of a boot loop while starting a new ROM. Bit even though I have the insurance I'm going to try and figure out what's going on. The phone appears to by symlinked in a bazaar way. Give me a few days.
[Motorola Photon 4G] keljoe2804:
I'm in CA and I don't get 4g where I'm at, but I was in the Merced area a couple of weeks ago and I got it for a little bit of time, pretty sure it still works. And yes you're right the Torpedo root process doesn't work for me either, althought I haven't tried it the the dock.
[Motorola Photon 4G] mof9336:
Anyone still having issues rooting PM me I may have found a work around.
[Motorola Photon 4G] keljoe2804:
Ok, figured out that I only had to change libphoton-torpedo.sh to libphoton-torpedo2.sh and also in the script everything worked flawlessly.

Thanks