SoundPool Class - Xposed Framework Development

Hi!
I've this code:
Code:
@Override
public void handleLoadPackage(LoadPackageParam lpparam) throws Throwable {
if (lpparam.packageName.equals("android") && lpparam.processName.equals("android")) {
findAndHookMethod(SoundPool.class, "play", int.class, float.class, float.class,
int.class, int.class, float.class, new XC_MethodHook() {
@Override
protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
XposedBridge.log("Left before hook " + param.args[1]);
param.args[1]=1.0f;
param.args[2]=0;
}
protected void afterHookedMethod(MethodHookParam param) throws Throwable {
XposedBridge.log("Left after hook " + param.args[1]);
}
});
}
}
It should modify the volume of left and right channels of audio. It is hooked (and the param.args are change), i can see log i've asked, but it doesn't work. Why? I don't think this is the right place to ask, because Xposed is working right, the method is hooked, but i don't know where to ask. It seems that SoundPool.play(...) works if use in a normal app, but i don't understand why it isn't working like this.

robertogl said:
Hi!
I've this code:
Code:
@Override
public void handleLoadPackage(LoadPackageParam lpparam) throws Throwable {
if (lpparam.packageName.equals("android") && lpparam.processName.equals("android")) {
findAndHookMethod(SoundPool.class, "play", int.class, float.class, float.class,
int.class, int.class, float.class, new XC_MethodHook() {
@Override
protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
XposedBridge.log("Left before hook " + param.args[1]);
param.args[1]=1.0f;
param.args[2]=0;
}
protected void afterHookedMethod(MethodHookParam param) throws Throwable {
XposedBridge.log("Left after hook " + param.args[1]);
}
});
}
}
It should modify the volume of left and right channels of audio. It is hooked (and the param.args are change), i can see log i've asked, but it doesn't work. Why? I don't think this is the right place to ask, because Xposed is working right, the method is hooked, but i don't know where to ask. It seems that SoundPool.play(...) works if use in a normal app, but i don't understand why it isn't working like this.
Click to expand...
Click to collapse
You should be accessing the application which makes use of the SoundPool.class, not "android".
Sent from my iPhone 6 Plus using Tapatalk

MaaarZ said:
You should be accessing the application which makes use of the SoundPool.class, not "android".
Sent from my iPhone 6 Plus using Tapatalk
Click to expand...
Click to collapse
Are you sure? I've done a module that hook a class and it keeps the led on with screen on. When I hook this class, I search for 'android', and it works on every app. Like this: http://forum.xda-developers.com/showthread.php?p=58840569
Inviato dal mio GT-I9505 utilizzando Tapatalk

robertogl said:
Are you sure? I've done a module that hook a class and it keeps the led on with screen on. When I hook this class, I search for 'android', and it works on every app. Like this: http://forum.xda-developers.com/showthread.php?p=58840569
Inviato dal mio GT-I9505 utilizzando Tapatalk
Click to expand...
Click to collapse
"android" is for system services, however SoundPool isn't a service.

MaaarZ said:
"android" is for system services, however SoundPool isn't a service.
Click to expand...
Click to collapse
Well, thanks, i will try.

I've tried without use any package name (i want to change on all apps). It hooks the method, but in the wrong package: it only hooks com.android.location.fused and com.android.providers.settings. If i start music, the music app isn't hooked. Also, if i select some music (like ringtones) from the settings, that isn't working (same music from both channels)

robertogl said:
I've tried without use any package name (i want to change on all apps). It hooks the method, but in the wrong package: it only hooks com.android.location.fused and com.android.providers.settings. If i start music, the music app isn't hooked. Also, if i select some music (like ringtones) from the settings, that isn't working (same music from both channels)
Click to expand...
Click to collapse
Are you sure that the music app uses SoundPool?
Sent from my iPhone 6 Plus using Tapatalk

MaaarZ said:
Are you sure that the music app uses SoundPool?
Sent from my iPhone 6 Plus using Tapatalk
Click to expand...
Click to collapse
Well, nope. But I've tried also Pocket Casts, and others music apps. I've never develop music apps, but i think that on android SoundPool is the favorite choice. For example, App Settings from rovo89 use SoundPool to remove audio from any apps, and it seems to work, basically with every app.
I'll try to use that part of code and see if that works for me. Maybe this isn't working on lollipop, but SoundPool.play isn't changed..
Inviato dal mio GT-I9505 utilizzando Tapatalk

Ok, thank you, i think i've solved: i've used 'android.media.MediaPlayer', with 'setVolume'. I didn't see it before because MediaPlayer.play() can't set the volume like SoundPool.play(...), but there is 'setVolume' that solves this. I've to say that 'setVolume' exists also in SoundPool, but it is used by 'play', that for me didn't work.
Thanks!
P.S. Of course, this doesn't work with everything. For example this doesn't work with settings, but i don't need that.

Other question (sorry ): i've found that some apps use AudioTrack.class (like Pocket Casts), but 'setStereoVolume' is deprecated from API 21. So, how 'findAndHookMethod' works? I think that apps like Pocket Casts could ignore 'setStereoVolume' and use only 'setVolume', that doesn't allow to work with the 2 channels. So, if i hook AudioTrack.class and 'setStereoVolume' i think that this will not work, right? I'm trying to hook AudioTrack.play() and use 'setStereoVolume' from 'beforeHookedMethod'. Is this possible?
With the new 'setVolume' it isn't possibile to work with 2 channels?
Edit: Well, 'setVolume' returns 'setStereoVolume', so... I'm going to play with that...

Related

Square Enix Chaos Rings a Final Fantasy look alike game

Hi, I want to play this game, but unfortunately it force close when you try to open the app. Do anyone here manage to get the game work on our s3?
the video:
http://www.youtube.com/watch?v=A9oOvmu2-XU
Square Enix always make the best games IMO but believe I heard/saw somewhere that u can't play this game on Rooted devices. One game ill be pasting up on cause Unrooting any my devices to play the game Very UNLIKELY!
Sent from my SAMSUNG-SGH-I717 using Tapatalk 2
Tha_King87 said:
I believe I heard saw/heard somewhere but u can't play this game on Rooted devices.
Sent from my SAMSUNG-SGH-I717 using Tapatalk 2
Click to expand...
Click to collapse
Wtf. Why cant we play it on rooted devices. It destroy the game? this is so silly.
007shaolin said:
Wtf. Why cant we play it on rooted devices. It destroy the game? this is so silly.
Click to expand...
Click to collapse
Maybe their "anti" root device
Ttblondey said:
Maybe their "anti" root device
Click to expand...
Click to collapse
They dont have any device. Btw this is the reason why people choose non japanese games today. They never listen to costumers. First they destroy the FF franchising game by making ffxi, ffxii, ffxiii to be feministic, linear and boring games. Then they making a jrpg game that looks promising to work only on non rooted devices. Square what are you thinking?
Got it to work on my Galaxy Note. Found this in the apk, so figured you just need to hide your superuser app. Renamed "superuser.apk" in my /system/app folder, then I could start the game fine. Once done playing, I renamed superuser.apk.bak to superuser.apk and all is well.
Code:
String[] packagename = new String[] {
decode(activity, "55E3819E6925E350523567266666667627776777") , //eu.chainfire.supersu
decode(activity, "3FDEEF3856F5E1E42F94E3566626676766726667666277") //com.noshufou.android.su
};
cooldoud said:
Got it to work on my Galaxy Note. Found this in the apk, so figured you just need to hide your superuser app. Renamed "superuser.apk" in my /system/app folder, then I could start the game fine. Once done playing, I renamed superuser.apk.bak to superuser.apk and all is well.
Code:
String[] packagename = new String[] {
decode(activity, "55E3819E6925E350523567266666667627776777") , //eu.chainfire.supersu
decode(activity, "3FDEEF3856F5E1E42F94E3566626676766726667666277") //com.noshufou.android.su
};
Click to expand...
Click to collapse
This did not work for me. I tried on a Galaxy Nexus. Not sure if that has something to do with it or not.
cooldoud said:
Got it to work on my Galaxy Note. Found this in the apk, so figured you just need to hide your superuser app. Renamed "superuser.apk" in my /system/app folder, then I could start the game fine. Once done playing, I renamed superuser.apk.bak to superuser.apk and all is well.
Code:
String[] packagename = new String[] {
decode(activity, "55E3819E6925E350523567266666667627776777") , //eu.chainfire.supersu
decode(activity, "3FDEEF3856F5E1E42F94E3566626676766726667666277") //com.noshufou.android.su
};
Click to expand...
Click to collapse
So you renamed the superuser.apk file only or you have to insert/modify the code in the apk file?
Nope, no tinkering with the CR apk needed, just rename the superuser.apk in /system/app (well I suppose YMMV, but it worked for me). Got a script you can run with Script Manager to hide/unhide Superuser.apk in the following thread: http://forum.xda-developers.com/showthread.php?t=1932078
Holy macarony. It actually work, I uninstalled the game first, and then rename the superuser.apk to superuser.apk.bak and then install the game again. Working like a charm.

Ways to stream content to TV

Given the moto G's lack of DLNA & Miracast/MHL I was wondering what ways are possible to stream pictures, music, video from my phone over to a TV
Currently this is how I do it, with mixed results,hopefully there is a better all in one solution.
Hardware:
HTC Medialink HD - connects to the TV HDMI
Moto G
USB OTG Cable
Flash Drive
Software:
ES File Explorer (to connect to the USB OTG (navigate to Storage/usbdisk_1.1.1)
Gallery Connect: https://play.google.com/store/apps/details?id=com.homeysoft.galleryconnect.ads
This actually is the only app that reliably and consistently actually manages to display my pictures onto the TV. Sadly it only does pictures.
Nexus Media Importer
https://play.google.com/store/apps/details?id=com.homeysoft.nexususb.importer
Same people as Gallery Connect, this works really well for USB OTG as it auto detects when you insert your usb drive, sadly I'm not sure if it's an Android limitation or a HTC Media Link problem, but if you get a file it can't display it will just show a 'receiving content' icon on the TV for ever, and you have to reboot the HTC Media link
Wi-Fi Media
https://play.google.com/store/apps/details?id=com.bianor.amscavium
This lets you (in theory) display your photos, videos, music etc, but you can't navigate out of the default Android folders for anything which is a drawback. What it does though, that is helpful is adds a play with Wi-Fi Media icon, so if you navigate to your files using ESFile Explorer you can sometimes stream movies over though it really depends on the codec, i'm not sure if thats Android or the wi-fi Media apps problem. It'd be really nice if you could just use the mx players ability because that plays just about anything.
I don't actually know what protocol the HTC Media Link HD uses, and I only tried it out of curiosity as it came with the wife's HTC One & isn't really meant to be used by non HTC Devices.
I've spent a few days downloading and trying pretty much every DLNA/UPNP app out there to see what would work, and there's only really those 3 that I've found, and something else called flipps HD, that plays from various video sites.
Maybe someone here would know the protocol and if there's anything else that might work better. I know given the hardware limitations of the Moto G things like Screen mirroring etc are most unlikely but it's interestesting to see what can be done.
No one ?
miracast is just disabled for some reason, i have made a small change to the framework to enable it
will post the mod in the mod / theme section soon.
BubbleUPNP (best) or Skifta (free)
wonder why they disabled miracast, I suppose it'll need root to turn back on. It would be nice if there was some way to contact Motorola to tell them to turn it on for the next update.
techguyone said:
wonder why they disabled miracast, I suppose it'll need root to turn back on. It would be nice if there was some way to contact Motorola to tell them to turn it on for the next update.
Click to expand...
Click to collapse
you don't need root, just a custom recovery to flash it
One theory I heard was that they disabled it because the phone does not have dual-band wifi.
Clearly it doesn't matter, besides they must be using some form of miracast for the moto migrate feature
Sent from my Moto G using XDA premium 4 mobile app
here it is if you want to test,
i don't have a mirror cast dongle yet so don't know if it actually connects and works
and don't really have the time to make a new thread right now as im working on a custom rom.
attached are two flashable.zip's one to revert (disable it again) and one to enable it, let me know if it connects and works
I'd love to, except no idea how to flash anything
Sent from my Moto G using XDA premium 4 mobile app
techguyone said:
I'd love to, except no idea how to flash anything
Sent from my Moto G using XDA premium 4 mobile app
Click to expand...
Click to collapse
first you need to have an unlocked bootloader, then flash clockworkmod recovery from here > http://forum.xda-developers.com/showthread.php?t=2563599
let me know once you have that and i can explain how to flash zips from recovery.
tillaz said:
here it is if you want to test,
i don't have a mirror cast dongle yet so don't know if it actually connects and works
and don't really have the time to make a new thread right now as im working on a custom rom.
attached are two flashable.zip's one to revert (disable it again) and one to enable it, let me know if it connects and works
Click to expand...
Click to collapse
This is great, I've got a Miracast receiver and I'm using it regularly. Tried flashing the zip but it results in an error during flashing since something has to be flashed to the data partition and none of the available custom recoveries for the Moto G can access encrypted data partitions. Bummer.
EDIT: It seems like the option is there now anyway I attached a screenshot. Will have to wait a couple of hours until I'm home to test if it works. I'll update this post!
I'm reluctant to possibly brick my 2 week old phone at this point, I'd much rather contact Motorola and try and get them to re-enable for their kit kat update to be honest, clearly the phone has the capability.
I have contacted Motorola directly, worst case they say no, we're no worse off, however you never know, they might just enable it.
tillaz said:
here it is if you want to test,
i don't have a mirror cast dongle yet so don't know if it actually connects and works
and don't really have the time to make a new thread right now as im working on a custom rom.
attached are two flashable.zip's one to revert (disable it again) and one to enable it, let me know if it connects and works
Click to expand...
Click to collapse
I have not checked it out intensively but this works with my Samsung F7000. Connecting is no issue, which is pretty strange since setting up just a wifi direct connection seems impossible.
The only issue I noticed is that changing orientation does not always work.
techguyone said:
I'm reluctant to possibly brick my 2 week old phone at this point, I'd much rather contact Motorola and try and get them to re-enable for their kit kat update to be honest, clearly the phone has the capability.
I have contacted Motorola directly, worst case they say no, we're no worse off, however you never know, they might just enable it.
Click to expand...
Click to collapse
its impossible for this to brick your phone,
and if they enable it they will just do it the exact same way i did, by changing a bool to true rather than false
all the zip does is replace framework-res.apk, with the small code change.
but if you don't know much about android / flashing its probably best you don't as not knowing what your doing
could lead to self caused problems (but not a brick)
Edit:
its probably disabled to make the phone look more lower end, as by default in the 4.2+ source code its turned on
so its clearly been disabled intentionally and not a mistake
tillaz said:
its impossible for this to brick your phone,
and if they enable it they will just do it the exact same way i did, by changing a bool to true rather than false
all the zip does is replace framework-res.apk, with the small code change.
but if you don't know much about android / flashing its probably best you don't as not knowing what your doing
could lead to self caused problems (but not a brick)
Edit:
its probably disabled to make the phone look more lower end, as by default in the 4.2+ source code its turned on
so its clearly been disabled intentionally and not a mistake
Click to expand...
Click to collapse
Hitillaz, thanks for this!!!
I don't have the custom recovery set up yet, so, is it possible to use ES Explorer, or Root Explorer to just backup and replace the existing /system/framework/framework-res.apk with the one contained in your zip file??
What permissions will I need to give the replacement
looks like this should be [rw-r--r--] owner: root group: root
Would that work??
I am just waiting to decide which Recovery to use.
Thanks.
I take it ChromeCast doesnt work unless you do these steps in this thread?
Hello.
Im from chile and im using moto g with movistar_chile version.
Does anyone managed to run the "enable_miracast.zip"? because it leaves me in a bootloop with my moto g.
After looking how to do it with my firmware (i think all the framework-res.apk aren't the same between the moto g models around the world), i managed to extract my framework-res.apk and followed the guide below:
https: / / github.com/kensuke/How-to-Miracast-on-AOSP/wiki/config_enableWifiDisplay (i cant post links)
here is the path of the file to modify in the moto g: "\ res framework-res \ \ values ​​\ bools.xml"
however I am not sure if through the "apktool" tool i did it right.
First I made the Apk file with "apktool b framework-res.apk" of the folder, then I did a flash.zip of the apk, but when I flash it, it happens the same with the attachment of this topic (use the same enable_miracast.zip provided by tillaz but replacing the framework-res.pk that i built)
I'm not sure if you understand what im trying to explain.
sorry for my poor english
if Moto G executable root & remount, miracast enables editing build.prop text file.
but Moto G implementation, build.prop debugging disabled maybe.
$ adb root
$ adb remount
$ adb pull /system/build.prop
(add persist.debug.wfd.enable=1 to build.prop)
$ adb push build.prop /system/
$ adb shell chmod 644 /system/build.prop
$ adb reboot
https://github.com/kensuke/How-to-Miracast-on-AOSP/wiki/config_enableWifiDisplay
Sent from my GT-I9100 using xda app-developers app
s107ken said:
persist.debug.wfd.enable=1 to build.prop)
Click to expand...
Click to collapse
Can confirm this works. You can edit the build.prop any way you like, e.g. directly using Root Explorer or similar app. Search for the above mentioned line
persist.debug.wfd.enable=0 ... by default it is 0, change it for 1 and that´s it.

Another Camera Fix (It's really a workaround) to try

Short version:
1. Download the apk posted below and install it.
2. Set the app to run on boot using the method of your choice (I use Tasker).
Updated app link:
http://forum.xda-developers.com/showthread.php?p=52696903
Long version:
Hello there,
This is basically a call for a bit of dev help for a potential workaround I think I may have stumbled upon for fixing the annoying hanging camera issue we seem to have on a bunch of the CM/AOSP based roms. The symptoms of the issue are:
1. Reboot phone
2. Open any camera app - there's a frozen frame for a moment then it either
a. works normally
b. freezes and camera apps then "cannot connect to camera" until you reboot and try again.
The issue I was seeing on my phone (running the awesome SlimKat ROM) was that sometimes it would end up at 2a, and sometimes at 2b. I could not see any pattern, rhyme, or reason for it. Until...
I opened the ROM's camera app (set to store on my SD card) with my SD card removed. This caused the camera app to crash before showing any camera preview. I then noticed that once I put the SD card back in the camera app would open and work perfectly and immediately. No freezing at all. I have replicated about 20 times successfully, with no instances of 2b.
That made me think. I've done some Android head tracking coding in the past and worked with camera previews and I know that to get a camera preview running, you first open the camera object then start the preview. Since normally, sometimes the situation would be 2a and sometimes 2b, that made me think that there might be a race condition happening between the "camera open" step and the "show preview" step.
So I made a simple app to open the camera, wait 5 seconds, and close, without showing any preview. I set this app to run on boot-up using Tasker. (This is meant to replace the manual SD card trick I was using, outlined above.)
I'm sharing this with the hope that the ROM developers, who are far more skilled than I, might use this information. I attached my apk (a better one is posted later in this thread with a link to that post in the next post), and I'll give you the code (again, updated later). I hope you can use it to confirm or reject my findings or even do a better job integrating it into your ROM then I did with my boot-up hack.
Thanks!
Code:
import android.graphics.SurfaceTexture;
import android.hardware.Camera;
import android.os.Bundle;
import android.app.Activity;
import android.view.TextureView;
import android.view.TextureView.SurfaceTextureListener;
public class MainActivity extends Activity implements SurfaceTextureListener{
private Camera mCamera;
private TextureView mTextureView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mTextureView = new TextureView(this);
mTextureView.setSurfaceTextureListener(this);
setContentView(mTextureView);
}
@Override
public void onSurfaceTextureAvailable(SurfaceTexture surface, int width, int height) {
mCamera = Camera.open();
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
}
mCamera.release();
android.os.Process.killProcess(android.os.Process.myPid());
}
@Override
public void onSurfaceTextureSizeChanged(SurfaceTexture surface, int width, int height) {
// Ignored, the Camera does all the work for us
}
@Override
public boolean onSurfaceTextureDestroyed(SurfaceTexture surface) {
mCamera.stopPreview();
mCamera.release();
return true;
}
@Override
public void onSurfaceTextureUpdated(SurfaceTexture surface) {
// Update your view here!
}
}
This is the apk mentioned above:
http://forum.xda-developers.com/showthread.php?p=52696903
drklaw said:
Long version:
Hello there,
This is basically a call for a bit of dev help for a potential workaround I think I may have stumbled upon for fixing the annoying hanging camera issue we seem to have on a bunch of the CM/AOSP based roms. The symptoms of the issue are:
1. Reboot phone
2. Open any camera app - there's a frozen frame for a moment then it either
a. works normally
b. freezes and camera apps then "cannot connect to camera" until you reboot and try again.
The issue I was seeing on my phone (running the awesome SlimKat ROM) was that sometimes it would end up at 2a, and sometimes at 2b. I could not see any pattern, rhyme, or reason for it. Until...
I opened the ROM's camera app (set to store on my SD card) with my SD card removed. This caused the camera app to crash before showing any camera preview. I then noticed that once I put the SD card back in the camera app would open and work perfectly and immediately. No freezing at all. I have replicated about 20 times successfully, with no instances of 2b.
That made me think. I've done some Android head tracking coding in the past and worked with camera previews and I know that to get a camera preview running, you first open the camera object then start the preview. Since normally, sometimes the situation would be 2a and sometimes 2b, that made me think that there might be a race condition happening between the "camera open" step and the "show preview" step.
So I made a simple app to open the camera, wait 5 seconds, and close, without showing any preview. I set this app to run on boot-up using Tasker. (This is meant to replace the manual SD card trick I was using, outlined above.) So far, I've run it about 5 times and the camera has been starting right up for me.
I'm sharing this with the hope that the ROM developers, who are far more skilled than I, might use this information. I attached my apk, and I'll give you the code. I hope you can use it to confirm or reject my findings or even do a better job integrating it into your ROM then I did with my boot-up hack.
Thanks!
Code:
import android.graphics.SurfaceTexture;
import android.hardware.Camera;
import android.os.Bundle;
import android.app.Activity;
import android.view.TextureView;
import android.view.TextureView.SurfaceTextureListener;
public class MainActivity extends Activity implements SurfaceTextureListener{
private Camera mCamera;
private TextureView mTextureView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mTextureView = new TextureView(this);
mTextureView.setSurfaceTextureListener(this);
setContentView(mTextureView);
}
@Override
public void onSurfaceTextureAvailable(SurfaceTexture surface, int width, int height) {
mCamera = Camera.open();
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
}
mCamera.release();
android.os.Process.killProcess(android.os.Process.myPid());
}
@Override
public void onSurfaceTextureSizeChanged(SurfaceTexture surface, int width, int height) {
// Ignored, the Camera does all the work for us
}
@Override
public boolean onSurfaceTextureDestroyed(SurfaceTexture surface) {
mCamera.stopPreview();
mCamera.release();
return true;
}
@Override
public void onSurfaceTextureUpdated(SurfaceTexture surface) {
// Update your view here!
}
}
Click to expand...
Click to collapse
Sounds good. A nice and simple solution actually.
But one question: why does your workaround waits for five seconds? Is it possible to decrease the time?
peddarson said:
Sounds good. A nice and simple solution actually.
But one question: why does your workaround waits for five seconds? Is it possible to decrease the time?
Click to expand...
Click to collapse
Probably. I just arbitrarily chose that based on my estimate of the time the camera would freeze when starting.
I got ur app and Tasker app but dont knw how to use Tasker to set ur app to run on boot..
Can someone help me with Tasker??
Sent from my Micromax A110Q using Tapatalk
Make a task to open the app, then make a profile to run that task on device boot.
Works fine with PAC rom. Thanks!!
Cheers!
Sent from my Xperia Z1
Great find. Would there be a way to implement an option to load a certain camera app too in the meantime? Have an "options" for the APK to choose say Google Camera, Camera2, or other camera app. Then use the main APK you made, to launch the non-preview then load the actual camera app?
I don't use Tasker, and figured this way, I could hide my Camera app from the app drawer, and just use this as a standalone.
1. Tap the "Fixed" apk
2. Launches non-preview and exits
3. Launches chosen camera app.
Juzman said:
Great find. Would there be a way to implement an option to load a certain camera app too in the meantime? Have an "options" for the APK to choose say Google Camera, Camera2, or other camera app. Then use the main APK you made, to launch the non-preview then load the actual camera app?
I don't use Tasker, and figured this way, I could hide my Camera app from the app drawer, and just use this as a standalone.
1. Tap the "Fixed" apk
2. Launches non-preview and exits
3. Launches chosen camera app.
Click to expand...
Click to collapse
This is possible but the application only needs to be ran once. If it can be ran at boot in the background for example you won't notice a thing plus you won't have to wait 5 seconds before you open the actual camera application. A thing you might be concerned about is a performance impact at boot, I think this will be very minimal though since the Z1 is a very powerful device.
It's a very interesting workaround for sure and until a real fix has been found it would be nice to have a better way of implementing this. For now, it seems to work great! So good work OP!
Juzman said:
Great find. Would there be a way to implement an option to load a certain camera app too in the meantime? Have an "options" for the APK to choose say Google Camera, Camera2, or other camera app. Then use the main APK you made, to launch the non-preview then load the actual camera app?
I don't use Tasker, and figured this way, I could hide my Camera app from the app drawer, and just use this as a standalone.
1. Tap the "Fixed" apk
2. Launches non-preview and exits
3. Launches chosen camera app.
Click to expand...
Click to collapse
Ya it will do but u ll have to do this by ur own on as soon as ur device boots up because if u don't do it and opens camera app and if it showed Can't connect the Camera Error and then after that if u press this app then it won't be able to help u.. It will crash, happened with me.
Sent from my Xperia Z1 using XDA Premium 4 mobile app
abbychauhan said:
Ya it will do but u ll have to do this by ur own on as soon as ur device boots up because if u don't do it and opens camera app and if it showed Can't connect the Camera Error and then after that if u press this app then it won't be able to help u.. It will crash, happened with me.
Sent from my Xperia Z1 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Yes. This workaround is designed to prevent the camera from breaking when opening for the first time since reboot. It doesn't fix it once it's broken. I doubt anything could do that.
Is there a init.d script that can execute the app in the background?
ikenley said:
Is there a init.d script that can execute the app in the background?
Click to expand...
Click to collapse
Looks like it's possible:
http://stackoverflow.com/questions/5494764/how-to-run-a-specific-android-app-using-terminal
Does your fix also work if the cam is doing normal directly after booting, but not after a day of running? In my case I started it random 3 times during the day without a reboot. But at the 4th try it froze.
drklaw said:
Yes. This workaround is designed to prevent the camera from breaking when opening for the first time since reboot. It doesn't fix it once it's broken. I doubt anything could do that.
Click to expand...
Click to collapse
Just a suggestion.. Can u make something like "Restart Camera App" or something like that as if Camera broken after a day or two so we didn't have to reboot the phone as ur app doesn't fix it once it's broken and v ll have to reboot. By this we just use Restart Camera App and then use ur App and have a perfect camera without a Reboot.
Thanks in Advance
Sent from my Micromax A110Q using Tapatalk
->--- said:
Does your fix also work if the cam is doing normal directly after booting, but not after a day of running? In my case I started it random 3 times during the day without a reboot. But at the 4th try it froze.
Click to expand...
Click to collapse
No. It won't fix it if it breaks later. I've never seen the camera break after it's been working but my uptimes are typically less than 1 day since I notice a bit of sluggishness after that time. I reboot every morning.
drklaw said:
This is basically a call for a bit of dev help for a potential workaround I think I may have stumbled upon for fixing the annoying hanging camera issue we seem to have on a bunch of the CM/AOSP based roms. The symptoms of the issue are:
1. Reboot phone
2. Open any camera app - there's a frozen frame for a moment then it either
a. works normally
b. freezes and camera apps then "cannot connect to camera" until you reboot and try again.
Click to expand...
Click to collapse
Want to point out that this issue affects not only AOSP roms, but stock too. Had this issue on .757 and experienced it few times now on .761.
drklaw said:
No. It won't fix it if it breaks later. I've never seen the camera break after it's been working but my uptimes are typically less than 1 day since I notice a bit of sluggishness after that time. I reboot every morning.
Click to expand...
Click to collapse
In my case the cam is working without any fix, for about a day. Yes, there is the issue that the first activation takes some time and the first frame is frozen. But it is starting and the frozen frame is just at first start and disappears after some seconds. But if I run my phone longer than a day it has the bug. No matter which one of the 3 or more fixes that you can find in the forum, I am using.
My opinion is, that such a device should run without reboot for as long as possible. Normally I have to recharge after 3-4 days and I do not reboot just because I am charging. But if I start the cam, it is like russian roulette, after some time there is no other way. The cam is just working for an undefined period of time without issues. Could be a day, can be 2 days, but then..peng..stuck at activation. Today it froze my whole device while I was playing music with walkman app.
Maybe it is necessary to use the "fix" every time before using the cam. I haven't tried that for now. If that has to be done I have a request. Maybe it is possible to include a setting into your app, where I can define my favourite camera app. So that every time I start your fix, it is activating my cam app after it has done its fixing. Would that be possible?
You could use Tasker to make a task that starts the app and then opens the camera. You could then make a shortcut to run that task. I'm a big fan of Tasker.
Sent from my Xperia Z1 using Tapatalk

[Q] Snapchat Hack

So coming off iphone, when i jail broke it, i had this thing called phantom which basically allowed me to screenshot a snapchat without that person knowing . Is there something like that on android so i can use on my g3? I'm on lollipop.
Try normal screenshot by pressing volume down and power button
Sent from my LG-D690 using XDA Free mobile app
singhranjit said:
Try normal screenshot by pressing volume down and power button
Sent from my LG-D690 using XDA Free mobile app
Click to expand...
Click to collapse
that way, the person will know (receives notification) that you captured screenshot.
Not on Lollipop. KitKat only with Xposed Frameworks.
On 4.4.4 and down you can use xposed framework to get some new Snapchat features
Xposed has two or three apps I'm using for various snap chat features like secret screen shot and automatic picture saving.
luvg3 said:
So coming off iphone, when i jail broke it, i had this thing called phantom which basically allowed me to screenshot a snapchat without that person knowing . Is there something like that on android so i can use on my g3? I'm on lollipop.
Click to expand...
Click to collapse
Try CM.Security
aliko007 said:
Try CM.Security
Click to expand...
Click to collapse
Is that the antivirus app?
i don't think there's a way to save screenshots on lollipop, on kitkat it's possible, btw why want to save photos without the other one knowing xP kinda dishonest haha
Use screenshot easy from play store for screenshot on lollipop
No hack needed... Screenshots send notifications back to the sender stating that you took a screen shot. I recommend Save My Snaps, as it can all be automated. If you use this app tho, remove your standard SnapChat app, otherwise they will conflict and get you banned.
tribalartgod said:
No hack needed... Screenshots send notifications back to the sender stating that you took a screen shot. I recommend Save My Snaps, as it can all be automated. If you use this app tho, remove your standard SnapChat app, otherwise they will conflict and get you banned.
Click to expand...
Click to collapse
Dont Snapchat detect these third party apps and ban you? The ones that hook into Snapchat are safe but there's only one iv seen someone working on called Snapcatch, but its not working properly just yet which sucks
Snapchat won't ban you if ur on a kitkat ROM its the only way of doing it with out others knowing. U need to get exposed module called keepchat
Sent from my LG-D850 using Tapatalk

Huawei ascend mate b331 OTA (after along time)

Sent from my HUAWEI MT1-U06 using XDA Free mobile app
Downloading.....update log is in chinese
Sent from my HUAWEI MT1-U06 using XDA Free mobile app
shaun100689 said:
Downloading.....update log is in chinese
Sent from my HUAWEI MT1-U06 using XDA Free mobile app
Click to expand...
Click to collapse
A new stock rom ?
Update Log
aguslage said:
A new stock rom ?
Click to expand...
Click to collapse
ya official stable version of b321... OTA
Update Log :
[System]
● Huawei EMUI3.0 version update: Provides a new interface, ease desktop, touch shot, Yuet audiovisual, family care, application market , as well as the Yellow Pages and other new life experience.
● The new usability detail design, to provide more convenient operating experience.
[The new interface]
● point, line, circle design, fashion magazines like visual enjoyment, translucent, fuzzy, big picture, blank, contrast; flatter, more minimalist elements
[free desktop ]
● massive online theme ; move across the screen, easy operation touch
[Photos]
● The camera interface is simple and fresh, rich watermark, super translation
[Yuet audiovisual]
● one million lossless music library, immersive experience, knowledge song songs, lock screen lyrics, desktop lyrics, lyrics tuning, single cloud sync songs, videos
[family care]
● screen sharing, remote assistance application
[market]
● artificial re-examination, a key installation, integration awarding life
[Yellow]
● Contact Card Services, strange numbers mark Life Yellow inquiry
is there paly store
Can't say...I already had it on b321...
Sent from my HUAWEI MT1-U06 using XDA Free mobile app
Beautiful y designed, many useful new abilities
But, it absolutely UNUSABLE. at least on a 1GB version of the Mate.
I'd running the update on my phone since Friday. Here what i came up with:
1. disastrous memory management. all apps (including the launcher) close as soon as you leave them. some time even if you hit the 'recent apps' button, the current app shuts down.
every press on the home button takes several seconds until it reloaded, even when theres almost no apps and widgets.
2. due to this memory problems, notification from several apps, including Whatsapp, Gmail, eBay and so on just not showing. and when you manually enter the app you get all of them at once.
3. heavy apps (browser, youtube, tapatalk atc.) some times shut down while you in them, and reloaded or stuck at black screen.
4. I couldn't get the Hotspot to work. it activated but the PC says "limited connection".
apart from that, the rom works just fine, reasonably fast, and all the pitchers works.
but it really unusable. I'm getting back to Paranoid.
My sentiments exactly. Have a look at my comments on B321 which was the beta to this version.
Sent from my MT1-U06 using Tapatalk 2
Running flawless on 2gb ram version
Sent from my HUAWEI MT1-U06 using XDA Free mobile app
With 2 GB B331 running well.
Problems:
1. Had to set all widget apps to "protected app" to get widgets functional.
2. No more NFC/Beam, no possibility to enable it (on my old B907 the NFC was functional)
Another problem I found is I can't root using eroot
Sent from my HUAWEI MT1-U06 using XDA Free mobile app
you will have to do it using adb commands
Give me the step by step
procedure
Sent from my HUAWEI MT1-U06 using XDA Free mobile app
Use this! http://translate.google.co.uk/trans...jibao.shuajizhijia.net/14569.html&prev=search
shaun100689 said:
Give me the step by step
procedure
Sent from my HUAWEI MT1-U06 using XDA Free mobile app
Click to expand...
Click to collapse
1. Connect your Mate to your computer.
2. Bring up command prompt.
3. Type in: "adb reboot bootloader" press enter. Your Mate will reboot into bootloader.
4. Type in "fastboot OEM unlock uuuuuuuu" press enter. This will unlock your bootloader.
5. Next change directory to the resource folder from mate toolbox
6. In this folder type: "fastboot flash recovery twrp......img" . Look for the name of the file starting with twrp and ending with .img and insert it exactly as it is written after recovery. Press enter. This will install Super su and twrp on your Mate.
You will now have root
Sent from my HUAWEI MT1-U06 using Tapatalk 2
---------------
Admin Note: this thread has a dedicated questions and answers section which you can access here -->.
Sent from my MT1-U06 using Tapatalk 2
OTA is not available here in Qatar.
Does anyone have the direct download? please share..thanks.
Okay got it and rooted with RootGenius 1.8.7

Categories

Resources