yashsingh1/xdaforums huggingface dataset:
[Sony Xperia M2] galaxyfreak:
​

CyanogenMod is a free, community built, aftermarket firmware distribution of Android 6.0 (MARSHMALLOW), which is designed to increase performance and reliability over stock Android for your device.

#include <std_disclaimer.h>
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/

CyanogenMod is based on the Android Open Source Project with extra contributions from many people within the Android community. It can be used without any need to have any Google application installed. Linked below is a package that has come from another Android project that restore the Google parts. CyanogenMod does still include various hardware-specific code, which is also slowly being open-sourced anyway.

All the source code for CyanogenMod is available in the CyanogenMod Github repo. And if you would like to contribute to CyanogenMod, please visit out Gerrit Code Review. You can also view the Changelog for a full list of changes & features.

Unofficial build of CyanogenMod 13 (Android 6.0.1) for the Sony Xperia M2 (eagle)​

What's working:

GSM

Mobile Data

Display

Camera

Audio playback

Audio recording

Video playback

Video recording

External SDcard

Internal SDcard

WiFi

WiFi tethering

Bluetooth

Bluetooth tethering

MTP

GPS

FM Radio

Notification LED

Deepsleep

Recovery

Sensors

NFC

USB OTG

Brightness control

Offline charging

Not working:

???

It's entirely possible that features not used by me are broken, but overall the device should be usable. You have been warned.

Download:

CM13

RC1 (by Konstantinosj77)

BETA 2 (by Konstantinosj77)

BETA 1 (by Konstantinosj77)

CM12.1

BETA 3 (by Konstantinosj77)

BETA 2

BETA 1

ALPHA 1

CM12

ALPHA 5

ALPHA 4

ALPHA 3

ALPHA 2

ALPHA 1

GAPPS

Source:

https://github.com/CyanogenMod

Thanks to:

jerpelea

kholk

erikcas

adfad666

konstantinosj77

freack_v

XDA:DevDB Information

CyanogenMod 13.0 for Xperia M2, ROM for the Sony Xperia M2

Contributors

galaxyfreak

ROM OS Version: 6.0.x Marshmallow

ROM Kernel: Linux 3.4.x

ROM Firmware Required: Unlocked Bootloader

Based On: CyanogenMod

Version Information

Status: Beta

Current Beta Version: 3

Beta Release Date: 2016-17-11

Created 2014-12-12

Last Updated 2016-08-29
[Sony Xperia M2] DanielFlorin:
Good work bro! Wait for fix camera:)
[Sony Xperia M2] manask002:
Thnx....bro.....

Now wait for fix camera on nfc.....
[Sony Xperia M2] macabrocabral:
We just need now and kernel for d2306 with CWM at least.
[Sony Xperia M2] andres_vlc:
Downloading and at one moment the install Thank you !!!!

---------- Post added at 10:49 PM ---------- Previous post was at 10:15 PM ----------

and installed the rom. is now starting. I left me the error when installing gapps .

install the kernel 4.4.2 to install gapps .

starting rom . configuration wizard stopped.

rebooting

---------- Post added at 11:27 PM ---------- Previous post was at 10:49 PM ----------

configuration wizard stopped

and there does not pass the phone

I could just put the pin number
[Sony Xperia M2] linuxct:
Andres, estoy poniendola yo tambien, reinstala sin las gapps, a mi me funciona, pero sin play store

Te mando MP
[Sony Xperia M2] Konstantinosj77:
Flashed on D2403 (m2 aqua)

working/not working list is the same!

But fm radio is not working,it gets signal and RDS is fine but i cant hear anything!

Of course phone is recognized as eagle...maybe you can find a way to recognize the correct model by unified builds or something?!
[Sony Xperia M2] linuxct:
Flashed with this GAPPS: https://s.basketbuild.com/filedl/gapps?dl=gapps-lp-20141109-signed.zip

Result: Bootloop.

Flashed with 4.4.4 PA GAPPS. Result: FC SetupWizard... So, What gapps shall we use?

Correct: No bootloop with 5.0 GAPPS. It booted after more than 5 minutes LOL
[Sony Xperia M2] andres_vlc:
reinstalling . that gapps wear?

---------- Post added at 11:50 PM ---------- Previous post was at 11:44 PM ----------

without gapps works ok
[Sony Xperia M2] linuxct:
Better. No GAPPS = Fluid rom.

With GAPPS= DISASTER. Too lag.

---------- Post added at 12:21 AM ---------- Previous post was at 12:01 AM ----------

Just found a good BUG, i think is related to the BOOT. When I turn off the phone, it turns on itself again, without touching any button. Only way to fully turn of, reset button in the simcard tray.

I'm right now going back to stock, if i can't turn off the phone, there might be something wrong with the boot image, sorry.
[Sony Xperia M2] Bryandu13:
Thank you bro !

You're a boss
[Sony Xperia M2] gmpdri:
e:cannot load volume /misc!

e:failed to unmount auto

e:failed to set up expected mounts for instal; aborting

installation aborted.

e:cannot load volume /misc!

Don't install..M2306

What do i do?
[Sony Xperia M2] manask002:
i flash this on xperia m2 dual d2302 an get bootloop......only vibrates
[Sony Xperia M2] andres_vlc:
The gapps flashed and the phone works perfect . It has some small delay . But very small

the e downloaded from this thread xperia sp. I already had but the download from here . if you want to try .http://xdaforums.com/xperia-sp/development/xperiasp-locked-bootloader-lbl-t2947194

the rom going great time

Thanks DEVS .

Fix waiting for the camera
[Sony Xperia M2] manask002:
Its work.....i get bootloop and only vibration when press power button and what is your model no..???

My device is xperia m2 dual D2302
[Sony Xperia M2] RatchetHacked:
Nice!! Camera sooner will be fix , bro u ported lollipop to our phone your3 like a KING for us!:highfive:
[Sony Xperia M2] ceciladams85:
What about Xperia M2 Dual? And screenshots please...
[Sony Xperia M2] Bryandu13:
Antutu : 16500 only :\ it's dude to gapps ?
[Sony Xperia M2] andres_vlc:
mine is the D2303

2g only work data .

the battery has a high consumption

to connect the phone to the charger being switched off is on .

off load it impossible
[Sony Xperia M2] galaxyfreak:
1. unquote full post.

2. edited first post. read the red part :D

Well yeah, when I tested i got 2G, tho I was indoor so not sure.

Also, SIM (operator) I was testing with did not support LTE.

So, I will need a feedback for 3G/LTE from you guys.
[Sony Xperia M2] vusun123:
No he won't, as this is a dev thread
[Sony Xperia M2] micheal10198:
[MENTION=4635923]galaxyfreak[/MENTION] i am willing to test the latest build and provide the logcats for any bugs, i was running the alpha but reverted to omni as battery life wasnt very good
[Sony Xperia M2] vusun123:
You mean the recent omni builds or the build in the 2nd post ? If recent build then battery is not that good either, also weird problems too. erikcas and galaxyfreak is working together to fix things, they are almost there
[Sony Xperia M2] micheal10198:
Lp build in 2nd post has bad battery life thats why i am now running omni
[Sony Xperia M2] lccsr:
new AOSP

Hello guys, happy new year for all.

Probably, you already saw these archives, but (just in case), is there any helpful change for your source in this new AOSP released by Sony (I mean 2014-12-19)?

###developer.sonymobile.com/knowledge-base/open-source/open-devices/latest-updates###

Just remember to put "http" on the begin. I had to cut it off because I don't have 10 posts yet
[Sony Xperia M2] Alfred1516:
Can you port Stamina mode please?
[Sony Xperia M2] ^^Robi:
Camera and random reboots are more important than stamina :D But yes it would be cool to reduce battery drain. They need some time and it will work like a charm.
[Sony Xperia M2] vusun123:
I thought Lollipop comes with its own battery saving features ?
[Sony Xperia M2] Supercharlie25:
I think we will have lollipop fully working in summer hahahahah

Meanwhile, stock
[Sony Xperia M2] ^^Robi:
[MENTION=985241]erikcas[/MENTION] and [MENTION=4635923]galaxyfreak[/MENTION] are working hard :D but its not easy fix obviously. Until summer maybe we will get offical lollipop?
[Sony Xperia M2] vusun123:
Official Lollipop from Sony ? Nah, not until all flagship phones had it first. Or it could be abanddon. Omni according to erikcas, is pretty much usable for now ( save for the camera which is a pain )
[Sony Xperia M2] ^^Robi:
Z series are getting lollipop next month. So other devices could get it till summer... Camera is pain in the ass. But am still trying to have lollipop for my daily driver only thing that is killn me more than camera are random reboots.
[Sony Xperia M2] vusun123:
Random reboot is killing everyone more than having a rom to use you know ? Imagine you are taking an important call and boom, phone reboots. I know because I have been there
[Sony Xperia M2] Supercharlie25:
For me camera and basic things like calls in AOSP. Random reboots arent so bad, because it RE-boots, not turns off.

PD: i tried to install gaps on AOSP 4.4 flashing recovery kernel, flashing gapps and then reflashing rom's kernel, but it doesnt works. Has someone did it??
[Sony Xperia M2] ^^Robi:
Reboots are same annoying as turn off lol it does the same? makes your phone unusable for some time and you are unreachable and its very annoying when u wait for some important call etc. About flashing there is no special method. You need to wipe data and cache dowload omni ( or other rom) flash it then flash gapps and it should work.
[Sony Xperia M2] Supercharlie25:
I know, but un aosp 4.4 , it doesnt boots, and i used correct gapps.
[Sony Xperia M2] galaxyfreak:
CM12 ALPHA 2 TEST BUILD

As I see people giving summer ETAs for new build, here I have uploaded new one.

Changelog

- Updated to 5.0.2

- Rebased on Sony's AOSP tree

- Fixed recovery flashing

- Fixed recovery resolution

- Fixed random reboots.

- Fixed power off

- Fixed UI lag

- Disabled not-working FM Radio app

TEST ON YOUR OWN RESPONSIBILITY AND ON YOUR OWN D2303. There's a high chance of your phone going boom if its not D2303.

- Untested mobile data

- Camera not working

- NFC not working

Minor bugs that I know how to fix but I'm too sleepy to fix today:

- Brightness changing

- Booting to recovery with keys (Rebooting from power menu works)

YOU CANNOT FLASH THIS OVER OMNI. Use this recovery http://www.mediafire.com/view/?9hlkww33md9krkv

Download: http://www.mediafire.com/?w0vxn215s1u0xds
[Sony Xperia M2] vusun123:
Is the variant detection still in this build [MENTION=4635923]galaxyfreak[/MENTION] ?
[Sony Xperia M2] scaschera:
This don't want to install on my eagle LTE :(
[Sony Xperia M2] galaxyfreak:
What recovery are you using
[Sony Xperia M2] gregory678:
Link is invalid.
[Sony Xperia M2] karlmorgan92:
Not invalid but you need a key. I don't know, but I think there are not many chances to see MM in our devices, at least not a stable release, correct me if I wrong.
[Sony Xperia M2] Konstantinosj77:
No sources =no way to fix anything

You can't do anything.There is no stable CM13 build...
[Sony Xperia M2] jobinrjohnson:
I also tried it. It wont

---------- Post added at 04:32 PM ---------- Previous post was at 04:00 PM ----------

Here is the working link

https://onedrive.live.com/?authkey=%21AIAixlfmiDf-uR8&id=A8E8D2CE3C5C608%219719&cid=0A8E8D2CE3C5C608
[Sony Xperia M2] gregory678:
Ehm, check this out

http://uploaded.net/f/53n94q

Latest version is from July.

Thanks man! :)
[Sony Xperia M2] iqan:
thanks for reply :) let me know if anything comes up. :P
[Sony Xperia M2] DeMaCr:
What is it? Who makes this rom and what is working or not?
[Sony Xperia M2] karlmorgan92:
Have you tried any of those roms?
[Sony Xperia M2] jobinrjohnson:
Yes I tried the latest cm 13. The ROM was OK but as usual sim card and camera won't work.But the 2015 version has the support for dual sim variant also
[Sony Xperia M2] vijaykmr:
This build is very stable except DS, and freack_v's build lags a little, but DS works. Maybe we could ask him to help fix it. But he isn't active here, Is there any way of contacting him?
[Sony Xperia M2] xazakasrizava:
OTG doesn't work, I'm using a D2303 with the latest build.
[Sony Xperia M2] gregory678:
I think it's from FreeXperia group, like AOSP 5.1.1. Everything works except camera.
[Sony Xperia M2] iFlashed:
So we will never have working camera on cm13

Enviado desde mi Xperia M2 mediante Tapatalk
[Sony Xperia M2] galaxyfreak:
Where are you getting that from. kj77 is working on booting CM13 (I've booted it no problem but that was months ago), and I've got some patches for camera that should make it load. Fingers crossed. :)
[Sony Xperia M2] freack_v:
And what a patch?
[Sony Xperia M2] xazakasrizava:
Bump
[Sony Xperia M2] Konstantinosj77:
Thanks for spamming a development thread over and over...other users reported OTG is working,so maybe there is something wrong with your USB?
[Sony Xperia M2] xazakasrizava:
Perhaps, terribly sorry to bother you, won't happen again ;)
[Sony Xperia M2] galaxyfreak:
If this is your error

This might fix it https://github.com/galaxyfreak/device-sony-yukon/commit/e9596c8b11dd36009393a17eadf812afa382acf9
[Sony Xperia M2] jobinrjohnson:
Please consider the dual sim variant in the next build.
[Sony Xperia M2] Konstantinosj77:
Small step ;)
[Sony Xperia M2] iFlashed:
Oh :eek:

Enviado desde mi Xperia M2 mediante Tapatalk
[Sony Xperia M2] LilBlinx:
That's awesome continuing your work on CM13, good job, well done! From what I can see it includes the 5th August patch right aka the ZNH5Y build?
[Sony Xperia M2] galaxyfreak:
Camera on CM13 is up! :victory:
[Sony Xperia M2] Konstantinosj77:
Ok guys... [MENTION=4635923]galaxyfreak[/MENTION] nailed it!! Some more things and we are ready for a release!!!
[Sony Xperia M2] LilBlinx:
I really hope it's tonight :p Good job guys
[Sony Xperia M2] freack_v:
kernel 3.4?
[Sony Xperia M2] freack_v:
fix for dual sim https://github.com/Freack-v/msm8226-common/commit/60d6fe0d29065712fc89f0c45d05a114d326d49d
[Sony Xperia M2] karlmorgan92:
I'm so happy to see that. You guys are awesome, thanks for keeping this device alive. I would buy you a couple of beers if I could.
[Sony Xperia M2] jobinrjohnson:
The lightbar issue is not fixed till now.

It is not a major issue. Fixing this can lead to a complete ROM.
[Sony Xperia M2] Lojzo_11:
This LED have Xperia M, not M2.
[Sony Xperia M2] jobinrjohnson:
I have that on my d2302. Iam not aware that the other variants possess this thing.
[Sony Xperia M2] iFlashed:
[MENTION=4635923]galaxyfreak[/MENTION] [MENTION=4550509]Konstantinosj77[/MENTION] I love you more than my mum guys. What about sensors? Should stock ones work?

Enviado desde mi Xperia M2 mediante Tapatalk
[Sony Xperia M2] Th3 Ant:
M2 also have this (D2303) but on stock it works only when you watching pictures etc. and not as notification LED.

Sent from D2303
[Sony Xperia M2] Konstantinosj77:
We have a patch for that...already tested on cm12.1 and should work on cm13 too ;)
[Sony Xperia M2] vijaykmr:
Sorry, but how does this work? I just tried to add those changes to files or added those files, but it didn't work.
[Sony Xperia M2] iFlashed:
Cool :D

Enviado desde mi Xperia M2 mediante Tapatalk
[Sony Xperia M2] Konstantinosj77:
Its not working..those lines are already in beta 3

Cause many of you asked for ETA in PM I'll give you some info

Current bugs are calls,nfc and FM radio

Camera is in a strange shape.if you flash over cm12.1 it works,but it fails on a clean flash..so have to investigate some more
[Sony Xperia M2] JuniorCaesar:
So, did you fixed greyish-display problem? If fixed, this is awesome :D
[Sony Xperia M2] ProtoDeVNan0:
How much time does it take to boot this rom up with gapps installed? My phone is just stuck at the CM logo and it's been 30-40 minutes already.
[Sony Xperia M2] karlmorgan92:
Mmm that's weird, because generally it takes around 10 min, at least in my case. Did you install everything? I read some posts ago that if you have a bootloop is because you need to install the sensors fix.
[Sony Xperia M2] Lojzo_11:
After CM build and GAPPS flash this https://mega.nz/#!3BFVBBCT!ATW9sg7peNOZutI5MRSx77ZFJQJqft1vPEkrGSiqrUY
[Sony Xperia M2] Andrej666:
Can't wait,Good luck guys!
[Sony Xperia M2] ProtoDeVNan0:
Huge thanks guys! It took like 20-30 seconds to boot up :D
[Sony Xperia M2] NieeLz:
what it is? 12.1 or 13
[Sony Xperia M2] karlmorgan92:
CM 13 :D
[Sony Xperia M2] slole:
Wow such success!! Because of this community this phone is better than most new low-end and some mid-range devices. Thanks and congrats!
[Sony Xperia M2] galaxyfreak:
Current state of things:

Camera derp is fixed, now working nicely.

Camera logs proven once again to be from the 7th circle of hell - fatal error was a missing data folder, overlooked as alot of stuff got squashed to one commit in sonyxperiadev when moving stuff around. Should've rebased the trees for CM13.

Sensors will now work for everyone out of the box!

Hacky fix, but can't to magic with stock blobs. Much better than having bootloop as a welcome, right?

Dual SIM users, will try something, no promises.

Remaining major issue are calls. Hopefully will fix that soon.

Happy to have [MENTION=4550509]Konstantinosj77[/MENTION] on board. I still love to be around here, and help others but building, downloading, flashing for years now got boring. I have a build for almost every day in 2015 on my HDD. I'm no longer very excited to see stuff work. So I'll be here, help if I can, but kj77 will ship builds. :)
[Sony Xperia M2] iFlashed:
Just cool ;)

Enviado desde mi Xperia M2 mediante Tapatalk
[Sony Xperia M2] Konstantinosj77:
Calls fixed :D
[Sony Xperia M2] Lojzo_11:
You are monsters w/ galaxyfreak! :victory: So when we can expect first build?
[Sony Xperia M2] stasiulc:
Awesome love you guys I'm waiting for relase <3
[Sony Xperia M2] nathankaunang:
:D still wait for release..very great 6.0 come to m2.. i dont believe it :good::good:
[Sony Xperia M2] TrafalgarD:
up :D still waiting
[Sony Xperia M2] grewicked:
[MENTION=4635923]galaxyfreak[/MENTION] [MENTION=4550509]Konstantinosj77[/MENTION] thank you guys. I am at least sure that 6.0 will be the best. :)
[Sony Xperia M2] edward_k3nway:
Guys, thank you so much for keeping this device alive, you are awesome. :) Do you think the battery will last longer on CM13?
[Sony Xperia M2] Konstantinosj77:
Actually I'm testing it and its the same as CM12.1

The reason for not releasing it yet is that the script for installing on alternative sensors fail...

Also NFC and FM are not working (yet)
[Sony Xperia M2] iFlashed:
Take your time ;)

Enviado desde mi Xperia M2 mediante Tapatalk
[Sony Xperia M2] ARandomIndian:
If you release before 25th I'll post a video of me eating a cucumber
[Sony Xperia M2] jobinrjohnson:
Does it works on the Ds variant
[Sony Xperia M2] Konstantinosj77:
I dont own a DS device so i dont know
[Sony Xperia M2] stasiulc:
Waiting <3
[Sony Xperia M2] linuxct:
Can I have a look? Maybe I can help. [MENTION=4635923]galaxyfreak[/MENTION]
[Sony Xperia M2] ZlyDzik:
Hello!

First of all, I want to thank you for developing CM for M2. I installed the latest version a couple of days ago. It's all great, fast, stable. However, I'm experiencing much faster battery draining than on the stock 5.1.1. I'll update the details, once I'm done with collecting data about that issue. Also I want to ask if it's a normal thing. I used CM on other phones, but I don't remember having such a problem. Once again, thanks for keeping this phone alive.
[Sony Xperia M2] freack_v:
del
[Sony Xperia M2] shenyo1:
I've a problem with my phone, Still no support for d2302 (sim card not detected issue) :( Why?
[Sony Xperia M2] iFlashed:
Dual sim users don't you think you are a bit nuisance? They said that they are working on it

Enviado desde mi Xperia M2 mediante Tapatalk
[Sony Xperia M2] NieeLz:
i think all phone who have dual sim at rom porting is always supporting single sim first, dual sim is later if the rom for single sim are stable
[Sony Xperia M2] rhzd:
can i get the source code? i want to change the kernel :)
[Sony Xperia M2] JuniorCaesar:
sony updated AOSP 7.0 build instructions http://developer.sonymobile.com/build-aosp-nougat-7-0/

and they will release resources of eagle :)
[Sony Xperia M2] slole:
Nice
[Sony Xperia M2] Th3 Ant:
Yeah... But probably still without camera :(

Sent from D2303
[Sony Xperia M2] slole:
Better than nothing.
[Sony Xperia M2] JuniorCaesar:
Naah, as we keep our devs, nothing is impossible :P
[Sony Xperia M2] Th3 Ant:
Yup, we almost have CM13 with working camera so why not CM14?

I need to think positive :D

Sent from D2303
[Sony Xperia M2] galaxyfreak:
Update - Nougat and stuff.

--

CM13 build is pretty much finalized. kj77 just wants to do some more testing before shipping. Typo in a bash script was dumb.

--

Sony AOSP project (sonyxperiadev) is dropping active Yukon support in Nougat.

They're moving on to kernel branch without MSM8226 support.

That build guide bit is mis-copy/pasted.

--

Biggest news in Nougat for ROM community was dropping super-popular MSM8974 (Snapdragon 800/801).

Our platform is still alive (thanks to Android Wear, actually), so bring up should be pretty easy.

--

CM14 is currently at merging stage.

Manifest is still broken.

Pure AOSP gives me some issues with build server. Will just wait for CM to get usable (week or two).
[Sony Xperia M2] Th3 Ant:
Does it mean that 7.0 will be the latest "officially supported" AOSP ROM? What about further support? And what exactly do you mean by saying "thanks to Android Wear"? Does yukon/eagle family uses similar sources?

Sent from D2303
[Sony Xperia M2] slole:
No but our device uses the snapdragon 400 the same as most Android wear devices.
[Sony Xperia M2] ARandomIndian:
Great work man and Kj77

Ps. Does this mean we're possibly getting CM 14 too?

Not even going to ask for an eta though lol
[Sony Xperia M2] Umesh1041:
Anything for d2302...aka dual sim variant
[Sony Xperia M2] galaxyfreak:
If [MENTION=5360291]freack_v[/MENTION] releases his new fix we'll be glad to implement it.
[Sony Xperia M2] Otaku-San:
Hi Guys.

At first Big Thanks to the Devs making CM 12 for our Device. Can't wait for CM 13 :D:good:

So, I installed the Latest CM 12.1 Beta Version (Beta 3) and it seems to work nice on my Device. (Model Nr. 2403) But the Only Problem I have now is that I get all 10 Seconds "Unfortunately, Android AOSP Keyboard has Stopped." I already Cleared the App Data of the Keyboard in the Settings but the Keyboard is still not Working. So I Deactivated it.

Can someone tell me how to fix that? (I'm also not able to put my Wifi Password to Connect to my WLAN)

Have a Nice Day! :)
[Sony Xperia M2] Th3 Ant:
Try downloading Gapps with Google Keyboard.

Sent from D2303
[Sony Xperia M2] slole:
When my phone reaches zero percent battery the phone turns off. Then I plug my phone in and it charges for a few minutes and then attempts to turn on after it turns on it determines that the battery is to low and turns back off. So this cycle repeats until the phone gets charged enough. Is there a solution or do I just have to constantly check for battery percentage and turn the phone off manually before it runs out of juice. This is a mayor problem considering standby power drain is quite severe on this ROM.
[Sony Xperia M2] galaxyfreak:
Oops. [MENTION=4550509]Konstantinosj77[/MENTION] offline charging to todo list..
[Sony Xperia M2] iFlashed:
I think we have to modify the kernel and enable the power-off charging. I think is not a difficult thing. And yes, it's a really bad thing. My phone has to reboot around 10 times before it has battery enough :P. It starts charging at 0%

Enviado desde mi Xperia M2 mediante Tapatalk
[Sony Xperia M2] slole:
It could brick a device I have seen Nexus 7 having the problem of draining the battery to a point where it wouldn't turn on and you would have to manually jumpstart the battery. That was a hardware rather than a software problem but still that could happen if you would charge your phone on a weak charger and the battery would be drained further. And opening an Xperia m2 is not as simple at pulling off a removable back cover.
[Sony Xperia M2] Otaku-San:
Thank you it worked:D