yashsingh1/xdaforums huggingface dataset:
[Galaxy S 4 Q&A, Help & Troubleshooting] vallpaper:
Hi,

After I replaced camera glass (because it was scratched), external SDcard isn't working. All combination of ROMs and kernels were tried but nothing helped. I also tried replace SIM and SD card connector to motherboard (something like this: ebay.com/itm/Samsung-Galaxy-S4-GT-i9500-LTE-i9505-SIM-and-SD-Card-Connector-Flex-Cable-/301114351412 - sorry can't post outside link yet), but it didn't help either.

Neither in system nor recovery I can see sdcard.

It is probably a hardware issue, but can someone guess any other solution, try something or do any magic? What else could I try?

Thanks!
[XDA Assist] jjackson6025:
Has anyone been successful in installing CM11 on a Sony xperia Z3 compact? Any information you share will be greatly appreciated.
[XDA Assist] matt4321:
Hi there,

I'd suggest asking that question here: Xperia Z3 Compact Q&A, Help & Troubleshooting
[XDA Assist] vjevtani:
recently I tried to update my samsung galaxy s3 at&t to 4.4.2. it recommended to update the bootloader to NE4 then install the zip. but unfortunately i was only successfull in updating bootloader, zip failed with some errors. so i ended up having stock 4.1.1 with baseband version of NE4. everything is working fine but camera. Whenever i open camera, it ends up popping the error "Camera Failed".

i need help asap please.

i also want to know if i can downgrade my baseband ?
[XDA Assist] Darth:
Hi,

I suggest you ask the experts who own your device, here...

> AT&T, Rogers, Bell, Telus Samsung Galaxy S III > AT&T Galaxy S III Q&A, Help & Troubleshooting

Good luck!
[Moto G General] MarckozZ:
​

Hello guys, this guide is to help you to go back to Stock Firmware from any custom ROM or from Google Play edition firmware.

I started this thread because I have an Argentinian Retail Moto G, and downloaded the retail 4.4.2 firmware for Argentina, it comes in *.tar.gz format, but the guide stated above was for *.xml.zip firmware, so here it comes some differences.

DISCLAIMER: If your Moto G dies, explodes, turn into a zombie, goes berserk and tries to kill you, I'm not the one to blame. I've tested this tutorial and worked for me, if this does not work for you, keep googling about your problem. I can help you but its not my fault! Try this at your own risk.

THIS SHOULD WORK ON LOCKED AND UNLOCKED BOOTLOADERS​

LETS BEGIN...

-1 - Make a backup of all the apps and media in your SD card because all of this erases and formats everything inside! So backup everything!

0 - DOWNLOAD and install Motorola drivers.

1 - Go to THIS PAGE and download a 4.4.2 firmware suitable for your device. In my case I searched and downloaded Retail Argentina 4.4.2 firmware. There aren't a lot of 4.4.4 specific firmware, so download a 4.4.2 firmware. After installing it, you can OTA to 4.4.4.

2 - On Windows, create a temporary folder in drive c:\ called "restore" so it would be like this: c:\restore ; and there using 7zip or similar, extract everithing inside the firmware file into this "retail" folder. (The firmware I needed was in *.tar.gz format but this can work if the firmware you get is in *.XML.zip format)

3 - Now, download the attachment I provide you (those three files are from 4.4.4 OTA ZIP). Extract and place them inside the "restore" folder and replace the files inside.

4 - Download "mfastboot-adb.rar" in the attachments. After that, extract everything inside the RAR in the "restore" folder.

Important: Everything has to be inside the "restore" folder, don't leave files inside extraxted folders. It has to look like this:

​

5 - Turn off the phone and turn it on in FASTBOOT MODE (When turned off tap and hold ON BUTTON and VOLYME DOWN BUTTON for 5 seconds and release them, you should see the FASTBOOT MENU) and plug the phone to PC via USB.

6 - Start CMD (Windows console) with Administrator rights (in Windows 7 click on Start and in the search bar write CMD and above right click on CMD and start it as Administrator) and type:

This will place the console inside the "restore" folder.

7 - Here starts the COPY-PASTE action. Don't miss ANY LINE here!!! Copy and paste this lines one by one, waiting to the flashing to finish and giving an OKAY as a result!!! If some of this commands gives a (bootloader) FAILED answer, try to repeat that command.

Please, I say this again! Do this one line at a time, waiting for every line to flash and perform actions and to return an OKAY as an answer...

If every step on the copy-paste steps give OKAY as an answer, you will see your Moto G return to life with the original Moto firmware!!!! The first boot will take like 7 or 8 minutes, so be patient!

So this is it. If you need help let me know below... :fingers-crossed:
[Moto G General] anerik:
Everything looks good and worked for me except for 2 things:

-Flashing motoboot.img will error if you're trying to downgrade from 4.4.4 gpe or 4.4.3 moto but you can just skip it

-You need to add a .img at the end of this "mfastboot flash system system (this one gives trouble on non european models but is the one that works on american (and argentinian) Moto G!)" (not a big deal but it errors if you don't and people can get scared)
[Moto G General] MarckozZ:
You're damn right man, correcting right now! :good:
[Moto G General] titotito1983:
Hey man thanks for the guide. No the question is, why flash back? GPE is much better for me! or it is because we will have problems when trying to update to Android L?
[Moto G General] SloppyBeef:
I plan to do this when 5.0 comes out. Currently I'm on CM11. However, on the official downloads page I only see 4.4.2 for my retail firmware. Would this be fine if I'm on 4.4.4?

Thanks for the guide.
[Moto G General] AgentChaos:
there is one thing, if you upgrade to 4.4.3/4.4.4, you will not be able to downgrade yourself to 4.3.

I have tried. it just wont boot.
[Moto G General] MarckozZ:
Yes, I was on GPe 4.4.4 firmware, then I flashed 4.4.2 Moto firmware, then OTAed to 4.4.4 Moto firmware.. So this will work..
[Moto G General] MarckozZ:
Yes, that is true, so 4.3 is no more an option.. I wonder if this will happen in the future, I mean, maybe when 5.0 comes out, will it be impossible to downgrade to 4.4.2 firmware also?... I hope I'm wrong..
[Moto G General] MarckozZ:
This is just in case you miss Stock firmware... If you like GPe firmware just stay there, but if you have trouble you can use this guide. Also this should work to revert from CM11 or another custom ROM. :good: But, when Lollipop arrives, there will be no problems with OTAs on GPe firmware, but Motorola gives some extra features..

I returned to stock because of some options and features Stock firmware has... (FM radio, Sounds Effects, Assist, Moto Camera, OTG options on Settings > Storage, etc...)
[Moto G General] sublowBASS:
Hi, i bougth the Moto G in Argentina with 4.4.2 and unlocked the bootloader, updated OTA to 4.4.4 and rooted the device , if i do this procedure will i lost the CMW recovery and/or root? the bootloader will remain unlocked?

i just tried the Factory Reset option but it ends un a bootloop... is there another option to have the stock rom clean or i have to do all this?

THANKS !
[Moto G General] MarckozZ:
If you do all of this, you will loose root and CWM... but you can root it again when you do this procedure-- and the bootloader will remain unlocked. :good:
[Moto G General] Cyber.:
If you download the firmware in .xml.zip format enter :

mfastboot flash system system.img_sparsechunk.0

mfastboot flash system system.img_sparsechunk.1

mfastboot flash system system.img_sparsechunk.2

Instead of mfastboot flash system system.img
[Moto G General] MarckozZ:
When I tried to flash my specific firmware, those commands didnt work, and somewhere else I read those commands you say are for some european devices. I use the system.img command and it worked every time I do it on my retail Arg moto g. That is a little difference between some devices.

Edit: sorry I forgot that the firmware I used was in tar.gz format, so that's why those commands didn't work for me.. If the firmware you download is xml.zip you have to use the other guide that is on sticky posts.
[Moto G General] NTurky:
Thanks for your guide! It was very usefull.

I've been trying CM rom and the Decepticon kernel, and because of that I've reinstalled the stock rom quite a few times now.

Because of that, every time I restored the 4.4.2 rom (Retail Argentina) and then OTA to 4.4.4. It's very annoying to download that update every time and I couldn't find it online so I've made a backup of the update zip. That way I only need to enter into the recovery and flash the update.

Anyone else wants it?
[Moto G General] mspadam:
I was worried about the sparsechunk.xx files as well, but flashing them worked no problem for me (I'm using the Bell 4.4.2 Canada firmware).

Got my Moto G back to Moto stock 4.4.2 from GPe 4.4.4 just fine! Thanks Marckozz <3 Can confirm this works for XT1032 in Canada (although this is probably the same model as an American one to be honest).
[Moto G General] rahulroyale:
i was on stock 4.4.4(no root no unlocked boot loader indian moto g)

then i installed Asian stock soak 5.0.2 from here

http://xdaforums.com/moto-g/general/moto-g-xt1033-asia-retail-android-t3001206

but i want to install it from ota update( it has some other features also)

i have tried every damn method including yours but it shows invalid piv system signature file...

can you help?
[Moto G General] Maxxgavin:
gpe lollipop 5.0.1 to stock retail

hey man, thnks for ur guide, I have a question what if i have gpe. Lollipop 5.0.1 but i want the 5.0.2 lollipop retail firmware from motorola? How do i proceed? I want the argentinian retail stockand my bootloader is unlocked. Thks!
[Moto G General] MarckozZ:
Try this:

*Flash ENTIRE firmware image from Brazil Retail Lollipop 5.0.2... So your bootloader will be updated to Moto bootloader... (search in this forum that firmware image and steps to flash it, and yes, flash motoboot.img and gpt.bin also, I've done that and it can be flashed on top of the old Google bootloader from GPE)

*Then, flash Retail KK 4.4.4 using this guide, but dont flash motoboot or gpt.bin from 4.4.4....

*And last, update via OTA to Retail AR Lollipop...

:fingers-crossed:
[Moto G General] Maxxgavin:
Thks, but why do i have to flash the brazilian firmware first? Flashing directly the argentinian retail 5.0.2 wont work?
[Moto G General] AgentChaos:
there is no AR 5.0.2 firmware yet, you can either wait or do what @MarckozZ suggested
[ONE General] jojo_whit3:
[YOUTUBE]C3NPxRSn6cI[/YOUTUBE]​

Disclaimer

I'm not responsible for anything that may happen to your device. I've tested this mod to the best of my abilities, but I can't guarantee anything. Make a complete backup before applying any of these changes. If you brick your device, boot loop, lose data, or etc...again, I'm not responsible.

CM12 - Working

- CM12S YNG1TAS0YL with stock kernel

- CM12 nightly with stock kernel

CM11 - Working

- CM11S XNPH30O, XNPH33R, XNPH38R, XNPH44S, and XNPH05Q with stock kernel

- CM11, PAC-man, crDroid with most recent kernels

- franco r35 kernel

CM12.1 - Not Working

- CM12.1 nightly (bootloop)

CM11 - Not Working

- LiquidSmooth ROM (mediaserver seg faults immediately)

- OmniROM

Also, I found a commit in the CM source that adds Voice Wakeup options to the Settings app. If the ROM doesn't have this code compiled into their Settings, the mod will probably not work. You'll still be able to go through the training process, however, I don't believe Google Now will launch because the intent action is never being set.

Instructions

1.) Backup any important data on your phone (files, pictures, etc.)

2.) Boot into recovery. I use and have only tested with TWRP

3.) Make a nandroid backup

4.) Flash the mod

5.) Reboot

Recovery

If you encounter any issues (e.g. bootloop) or just want to remove the mod, go into recovery and restore just the System partition from the backup you made earlier (this will preserve your Data partition).

After Installation

After installing, you'll get a notification to enable Voice Wakeup and to train your voice. You can do this now or skip it. It can always be setup later by going to:

CM11: Settings --> Voice Wakeup --> Retrain your voice

CM12: Settings --> Language & Input --> Voice Wakeup --> Retrain your voice

Also...

1.) Go into the Google Now settings and disable "OK Google" detection settings.

2.) Disable your lockscreen if on CM11S or CM12S...other CM11/CM12 based ROMs should work fine since the apk is signed correctly. Some users have reported being able to use a 3rd party lockscreen (e.g AcDisplay) as a work around for CM11S.

If something is not working for you, I need the following or I can't help...

- The ROM you're using (date/version too)

- The kernel you're using (date/version too)

- A description of the problem

- A logcat of the problem in action

Changelog

[I]4-14-2015[/I]
- New test version for CM12 based ROMs. I believe this should work with most kernels.

[I]Version 2.0[/I]
- CM11 based ROMs only
- Updated mixer_paths.xml with more recent version from CM11
- Deodexed, signed, and zip aligned VoiceWakeup.apk. The app can now bypass the lockscreen on CM11 based ROMs
Disabling the lockscreen is still necessary for CM11S ROMs because those keys aren't public
- Added a "loud" version. It increases the microphone volume levels to make it more sensitive

[I]Version 1.0[/I]
- Initial Release
[ONE General] carburano:
Woow. It seems working flawlessly
[ONE General] Gideono:
me wanty. Hopefully you can post a how to in the near future
[ONE General] 26.2man:
Just curious, would this mod stop ota updates and if so is it easily reversible? Looks really nice.
[ONE General] Overdose1986:
share it pls!
[ONE General] Heisenberg:
Did you read the OP?

Transmitted via Bacon
[ONE General] darren486:
looks cool, do keep us updated if you are able to share this "legally" or can you pm me the "not so legal" way? LOL
[ONE General] rauldzmartin:
I didn't know I wanted this until now
[ONE General] daleski75:
That looks awesome
[ONE General] jojo_whit3:
I've been trying to contact someone from the Cyanogen team to get some more information about posting this. If anyone has any contact info, either send me a PM or send them over to this thread.

To give a little more information about this mod, its essentially a port of the VoiceWakeup.apk I found here. If you use apktool to disassemble this file, it's easy to tell it came directly from Qualcomm. However, if the Cyanogen team intended to release this apk with the phone initially, then I'm assuming they already have some agreement in place with Qualcomm. So hopefully that also means it'll be ok for me to post this mod in the near future.
[ONE General] jojo_whit3:
You would still be able to download the OTA updates, but you wouldn't be able to apply them since there would be changes to your file system. If you make a nandroid backup in recovery, then anything is easily reversible.
[ONE General] 26.2man:
Thanks. Hope you can release this soon.
[ONE General] BrianDigital:
Looks great, wonder if the cm team is working to make it work by choosing you own wake up command. Had it on my find 7a and saying snapdragon was strange
[ONE General] fards:
If it's already freely available then it's unlikely to cause any more issues, depends on what did you do to"port" it I guess.

All the cm11s apps have been made available, so if it came from an existing rom I can't really see much of an issue. But I'm not a lawyer :)

Alternative is to post a walkthrough of your changes to the original.
[ONE General] Kyle C:
Awesome work, hopefully you're and to post it up for us eventually.
[ONE General] justmpm:
Hi Everyone...I did a little thread cleaning. Please, lets not harass the OP about when this will be released. Like everything else on xda, it will be released when the developer is ready. Just as a reminder to everyone,

yes this is a hackers site, but certain things are not allowed. If the OP wants to make sure that he isn't violating CMs or Qualcomm's Intellectual Property then we should let him do this to his own satisfaction. Nobody

wants to see a modification removed because CM or Qualcomm complained.

Thanks!
[ONE General] BenSow:
This looks really good! Would love to have this feature, keep it up man
[ONE General] thaprinze:
If you're worried about posting the modded APK and the IP issues, can you at least let us know what you modded so we can do it on our own? :D
[ONE General] fards:
had a quick play with it earlier,

Cm 11 nightly contains the background libs (except liblisten.so) but there's some java calls missing. Curious that cm have left most of the libs in place.
[ONE General] jojo_whit3:
Ok. I just did a fresh install of the latest CM12 nightly (i.e. cleared data, cache, etc) and I was able to bypass the lockscreen. I'm not sure why it's not working for you, but that explains why I didn't see any permissions issues in your logcat.
[ONE General] cnrd:
Thanks, may be some settings that spilled over from 12S, as i did restore from Google's backup of that install, i'll try doing another wipe :)
[ONE General] rikta:
Looks like this might've just been made redundant. Bummer, cause this was a good get from the OP.

Carl Pei just announced they've halted the OTA rollout to resume with "okay OnePlus" support. Works with screen off too
[ONE General] billy_boolean:
Not working for me.

As requested :

Rom Exodus Vanir.

Option is added, able to train voice but phone is not waking up.

Thanks
[ONE General] jojo_whit3:
When you say "option is added", does that mean if you go to Settings --> Language & Input...there's a Voice Wakeup setting? Also, what kernel are you running?

Another thing to check...use an adb shell or a terminal app to run the command

service list

and look to see if "listen.service: [com.qualcomm.listen.IListenService]" is running.
[ONE General] billy_boolean:
Yes, voice wakeup is available in the menu.

Kernel is Linux 3.4

Listen.service from qualcomm is running.

Today, talkin to a colleague in french, the phone wakeup in google now.

Maybe I should try to train it again.

Thanks
[ONE General] TheROMGuy:
This mod with AK Kernel and COS12 gets kinda stupid.
[ONE General] AcmE85:
The official voicewakeup has been released with today's Cyanogen OS 12 OTA. Maybe this can be added to the Nightlies.
[ONE General] tiny4579:
If it works well, maybe I'll make an addon.d script to make it persistent. I wonder if anyone has pulled the files needed to get this to work.

Like OP was saying though regarding package signatures, this may not have the right signature to be able to unlock the device using CM nightlies.
[ONE General] Krato§:
hey snapdragon sounds way cooler then ok oneplus to me.

waiting patiently for the new version of hey snapdragon for cos12 :)
[ONE General] billy_boolean:
Update :

It's working, but not very well.

Wake up randomly in noisy environment.

Very difficult to wake the phone saying "Hey Snapdragon". I have shout it very loud !
[ONE General] waterdaan:
Here you go
[ONE General] TheROMGuy:
Anyone know how to set it to just unlock my device instead of opening an app?
[ONE General] tiny4579:
I don't know if you were attaching it for COS12 or CM12.1, but on 12.1 it hangs on starting apps. Here's a snippet of my logcat:

V/listen_hw( 1253): handle_notify_event: nothing to do, actual mad state = 0
F/libc ( 1253): Fatal signal 11 (SIGSEGV), code 2, fault addr 0xb6f61318 in tid 1253 (mediaserver)
I/DEBUG ( 249): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 249): Build fingerprint: 'oneplus/bacon/A0001:5.0.2/LRX22G/YNG1TAS0YL:user/release-keys'
I/DEBUG ( 249): Revision: '0'
I/DEBUG ( 249): ABI: 'arm'
I/DEBUG ( 249): pid: 1253, tid: 1253, name: mediaserver >>> /system/bin/mediaserver <<<
I/DEBUG ( 249): signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0xb6f61318
I/DEBUG ( 249): r0 b6f5aca9 r1 b6f61318 r2 b6f5acaa r3 b6f61784
I/DEBUG ( 249): r4 b6f61318 r5 00000001 r6 beec5800 r7 b5941bf4
I/DEBUG ( 249): r8 b6f61d54 r9 b5941c40 sl 00000000 fp beec5a4c
I/DEBUG ( 249): ip b6ca3ee8 sp beec57d8 lr b6e1ddc4 pc b6e1ddcc cpsr 800b0010
I/DEBUG ( 249):
I/DEBUG ( 249): backtrace:
I/DEBUG ( 249): #00 pc 00003dcc /system/lib/libcutils.so (android_atomic_add+24)
I/DEBUG ( 249): #01 pc 0000d763 /system/lib/libutils.so (android::RefBase::createWeak(void const*) const+6)
I/DEBUG ( 249): #02 pc 0000656d /system/lib/libaudiopolicyservice.so
I/DEBUG ( 249): #03 pc 00006ae9 /system/lib/libaudiopolicyservice.so
I/DEBUG ( 249): #04 pc 0000d5f1 /system/lib/libutils.so (android::RefBase::incStrong(void const*) const+38)
I/DEBUG ( 249): #05 pc 00001ddb /system/bin/mediaserver
I/DEBUG ( 249): #06 pc 00001711 /system/bin/mediaserver
I/DEBUG ( 249): #07 pc 0000ff79 /system/lib/libc.so (__libc_init+44)
I/DEBUG ( 249): #08 pc 000019b0 /system/bin/mediaserver
I/DEBUG ( 249):
I/DEBUG ( 249): Tombstone written to: /data/tombstones/tombstone_09
W/mediaserver( 1253): type=1701 audit(0.0:153): auid=4294967295 uid=1013 gid=1005 ses=4294967295 subj=u:r:mediaserver:s0 reason="memory violation" sig=11
I/ServiceManager( 239): service 'media.audio_flinger' died
I/ServiceManager( 239): service 'media.player' died
I/ServiceManager( 239): service 'media.camera' died
I/ServiceManager( 239): service 'listen.service' died
I/ServiceManager( 771): Waiting for service media.audio_policy...
I/ServiceManager( 771): Waiting for service media.audio_policy...
I/ServiceManager( 771): Waiting for service media.audio_policy...
I/ServiceManager( 771): Waiting for service media.audio_policy...

Looks like some editing or tweaking may be needed. May need to remove one or more of the files or something changed in 5.1 or CM12.1 causing this problem.
[ONE General] tiny4579:
I have not used this function before, but if it lets you set the launcher, that's what I'd try. Unless you want it to remain on whatever app was active when you locked the device.
[ONE General] TheROMGuy:
I came up with a fix. XP thanks though.
[ONE General] waterdaan:
They're just the files I pulled from today's update , I haven't changed anything

Wouldn't know how to.....

You could try flashing it without mediaserver

Or try this libc, There are some changes in it since the last update

https://www.dropbox.com/s/ccr11wkc13x4nr9/libc.so?dl=0
[ONE General] sam razzy:
Will it work on latest nightly build ? Wanna try it but don't want to try if its not for nightly build. Hope someone will come up with flashing mod for nightly cm build. :) thank you

Sent From OnEPluS¹ using Bullet Proof Ak Kernel
[ONE General] waterdaan:
Apparently not, sorry
[ONE General] Krato§:
any progress?
[ONE General] jojo_whit3:
I haven't even looked at the new update yet. I'm in the process of moving...so hopefully next week things will slow down and I can try it out.
[ONE General] tiny4579:
I'd be curious if the audio lib is causing the issue on CM12.1. It may be worth trying to remove all but the app and the files in /system/vendor/lib from the zip.

I wonder if the modified mediaserver is still needed for the listen service to start. I might give it a try later on today.

EDIT: The cm12s mediaserver is causing libc to crash. Looks like we might have to wait for CM12.1S/COS12.1 for Voice Wakeup in CM12.1.
[ONE General] Daedulus Minion:
Can someone point me out the post explaining the difference between the three files attached in OP? I did a search with the term difference (too many results) and the term opo hsm (irrelevant results) so I had no luck finding the difference. Can someone help?
[ONE General] conorkickass:
It is all spelled out in black and white in the first post, but here it is again.

opo_hsm_v2.0.zip - Version for CM11 only

opo_hsm_v2.0_loud.zip - Same as above, but microphone volume levels are increased to make it more sensitive

hsm_cm12s_test1.zip - test version for CM12 based ROMs
[ONE General] Daedulus Minion:
Hey thanks a lot. I went back to the OP but still couldn't find it. Maybe because I am on mobile? Anyways I am downloading the cm12 version now and flashing. Thanks.