[KERNEL][IDEA] Modify fstab to change /data mount point - Sony Xperia M4 Aqua

Good afternoon everyone. I wanted to compile the kernel in order to modify the three fstab files contained in the ramdisk file. The thing is changing /dev/... in the /data line by /dev/block/mmcblk1p2 (which is the second partition of the sdcard). If my idea worked, we could have as much internal space as we wanted. Today, I managed to do it, and this was the result (image attached)
Apart from the fact that the system takes 16 GB (which is obviously wrong), when android started gave a message similar to: TA size is less than 1 (I don't have a screen capture of that) and the network stopped working (Wifi was OK). Does anybody know what can the problem be?

This is the screen with that strange message, a bit scary

alguien24 said:
This is the screen with that strange message, a bit scary
Click to expand...
Click to collapse
Use adb logcat from boot..
And read and see what's causing the error..

vinay said:
Use adb logcat from boot..
And read and see what's causing the error..
Click to expand...
Click to collapse
It's probably a security feature

husam666 said:
It's probably a security feature
Click to expand...
Click to collapse
Apparently you are right..
I tried making little change and got no network.. :/
Why sony spend so much time in security from root users instead of making a property working rom.. Just look at performance
And camera in stock.. -_-

Related

Root filesystem image.

Alright, so the root filesystem image is in /mnt/system/androidmerged.squashfs.secure
So do a temp root, copy to /mnt/storage, and then a adb pull gets it over.
The squashfs itself is offset by 256 bytes, so:
losetup -o 256 /dev/loop0 ./androidmerged.squashfs.secure
At this point, the FS can be mounted or unsquashfs can be used to extract it.
So, what's the first 256 bytes? The secure implies some type of signature, but what kind, and what else is in all those bytes?
I'm not feeling brave enough to try just grabbing the first 256 bytes and appending a modified squashfs image to it on my device just yet, but if others try please report back. (On both if it works, and if not what it takes to recover the unit.)
how big is it? can you upload it somewhere? (or would this be illegal?)
damm.. i need my 101!
chulri said:
how big is it? can you upload it somewhere? (or would this be illegal?)
damm.. i need my 101!
Click to expand...
Click to collapse
75 MB - uploading now
Edit: And up: http://hotfile.com/dl/88050103/f99f306/androidmerged.squashfs.secure.html
thx!
how would you replace the root fs image on the device?
chulri said:
how would you replace the root fs image on the device?
Click to expand...
Click to collapse
Connect via ADB, do a temproot, put the file in /mnt/storage, then copy it into /mnt/system overwriting the existing file. /mnt/storage is an ext3 filesystem mounted read/write, however I simply do not know if it will be possible to recover the unit if there is some kind of signature verification and we fail due to a modified image.
Again, someone braver then I should make this attempt and let us know how it goes.
The source did not give all that many hints, but I need to dig through in some more detail.
zelch said:
Connect via ADB, do a temproot, put the file in /mnt/storage, then copy it into /mnt/system overwriting the existing file. /mnt/storage is an ext3 filesystem mounted read/write, however I simply do not know if it will be possible to recover the unit if there is some kind of signature verification and we fail due to a modified image.
Again, someone braver then I should make this attempt and let us know how it goes.
The source did not give all that many hints, but I need to dig through in some more detail.
Click to expand...
Click to collapse
If the unit will still boot to recovery could a full wipe and reinstall of the base AOS over USB get it back up and running?
krohnjw said:
If the unit will still boot to recovery could a full wipe and reinstall of the base AOS over USB get it back up and running?
Click to expand...
Click to collapse
Recovery shouldn't be part of the FS so at worst, you'd have to do a format/firmware install.
You can do a full system wipe/format from recovery. it's not in any damageable storage by us without flashing a new recovery image.
Interesting about the front 256 bytes. It must be a signature. Not sure what good rebuilding the squashfs will do as it'll still be read only but it's a start. We could at least update the system properly and install the appropriate apps. Maybe in make some of the system dirs symlinks to writable locations possibly.
Permroot, giving us a filesystem mounted RW and not no-suid.
Ideally, I'd like to have decent support for the internal storage being ext3 without nosuid, but first we need to be able to replace the root filesystem image.
Other notes..
Looking at the hexdumps, the 256 byte chunk does not contain the start of the md5, sha1, sha224, sha256, sha384, or sha512 checksums.
The most troubling option which comes to mind is that it is the right size for a RSA 2048 bit block, hopefully not.
Anyone have ideas on how to find the initramfs image that the bootloader is feeding the kernel?
For that matter, has anyone tried taking apart the OS update images?
zelch said:
For that matter, has anyone tried taking apart the OS update images?
Click to expand...
Click to collapse
I think the aos file or the responsible installer/updater should give us a lot of information about how this stuff can be updated.
chulri said:
I think the aos file or the responsible installer/updater should give us a lot of information about how this stuff can be updated.
Click to expand...
Click to collapse
Agreed.
It looks like usr/bin/abcbox in the root filesystem has something to do with the update process.
zelch said:
Agreed.
It looks like usr/bin/abcbox in the root filesystem has something to do with the update process.
Click to expand...
Click to collapse
And it definitely is!
On a rooted device:
Code:
/usr/bin # PATH=$PATH:/tmp
/usr/bin # ln -s /usr/bin/abcbox /tmp/cramfschecker
/usr/bin # cramfschecker
USAGE: cramfschecker FILENAME
/usr/bin # cramfschecker /mnt/system/androidmerged.squashfs.secure
cramfschecker : check against 2.0.54
cramfschecker verification OK
Anyone with some ARM disassembly skills feeling up to taking abcbox apart to see how it's doing the signature check?
And so I've been digging into this, and it turns out that this is really quite similar to how the Gen 7 Archos 5 IT is locked.
The signature there is a RSA + MD5 signature, which is really the worst case as that means a 2048 bit RSA key, so we're kinda screwed there.
http://strazzere.com/blog/?p=320 has a good description of the situation on the 5IT. Getting a flash_unlock binary should be fairly trivial, so perhaps we can tamper with the key store to add additional keys.
ah zelch, this is good stuff.
i'm gonna diff the archos gpl kernel, looking for changes at mtd stuff. maybe we can build a kernel module which enables r/w access to stage1
edit: or do we already have r/w access?
This stuff is all pretty interesting to read, but if I'm reading this correctly (and it is entirely possible I'm not) it looks kind of like this device is going to be a total pain in the ass to root, and it may take a considerable amount of time for us to get there.
Can someone who is more knowledgeable on this sort of thing verify that? Thanks for all your hard work guys. It's appreciated.
its definitly not going to be that easy as other android devices were but would it be so interesting if it wouldn't be so hard to root?
While that's true, it will make it a bigger triumph when it is finally rooted, the tinkerer in me is dying to mess with roms on this device and see what it can really do once it's cracked open. Keep up the great work guys, I'm following with baited breath.
Write to stage1 appears to exist, and indeed looking at /proc/mounts /mnt/rawfs is mounted rw. Looking at the kernel source, write support should Just Work.
So, looking through /mnt/rawfs avboot is clearly the boot loader which verifies stuff, but we lack source for it.
I have absolutely no knowledge of ARM asm, and screwing this up will absolutely brick your device, quite possibly beyond repair. (And I wouldn't bet on ArchOS being willing to replace it either, I sure wouldn't.)
So, anyone with the right background willing to step in here?
I'll keep digging, perhaps we can still find the answers.
Note: avboot has some strings which reference a development kernel, this bears some additional hunting.
I still haven't got my A101, but its finally on its way to my home.
can you please upload these files and give me kind of a tree of the folder structure?

phone force closing

I have been talking this over with Condemned Soul but wanted to see if anyone else has ran into this problem since he & I are both confused.
My fiances phone has been force closing a lot lately aka com.android phone not responding. I saw the first force close when I tried flashing Tazzs cm7 on his phone so thats when I first put on gsb 1.2
I switched his over to Sheds GSB on the 8th and it was great everything was fine but then I decided to try to improve on a few settings and when I restarted the phone it decided to start force closing.
I reflashed the rom and the gapps and everything seemed fine but then I wanted to put cs skull theme on his phpne since we had it on Kaos v9 but then when I restarted the phone after flashing the theme it force closed again.
So then I reflashed the rom and gapps again and got all his apps and settings all back how he had it and decided to do a Nandbackup so that we wouldnt have to keep reflashing the rom again and once I restarted the phone after the nandbackup it force closed again.
Long story short I reflashed the rom and gapps and now am in the process of getting his apps and settings back how he had it once again.
Am I doing something wrong to make it keep force closing? I would like to make a nandbackup at least for him so that we wont have to keep setting up his phone.
Thank you for any help
When you say you flash the ROMs, do you also do a wipe beforehand? If not, try doing a wipe and then install and see if that changes anything.
Yes I wiped both the factory and dalvk sorry I thought I mentioned that. lol.
labnjab said:
Yes I wiped both the factory and dalvk sorry I thought I mentioned that. lol.
Click to expand...
Click to collapse
Its a problem that happens on certain ROMs with certain themes. Not sure there's a fix for it, I just got around it by not applying the phone.apk theme.
zerocool79346 said:
Its a problem that happens on certain ROMs with certain themes. Not sure there's a fix for it, I just got around it by not applying the phone.apk theme.
Click to expand...
Click to collapse
phone.apk wasn't changed in the theme. Strange part is it's only on the one phone and haven't heard of it on any of the others.
CondemnedSoul said:
phone.apk wasn't changed in the theme. Strange part is it's only on the one phone and haven't heard of it on any of the others.
Click to expand...
Click to collapse
That is odd.
Update:
This is still causing issues. Going to try and format the sd like tazz suggested, but moving my phone.apk to his didnt work, and yesterday he had to restart his phone and it did it again and needlessto say hes not very happy with his phone. Says its not reliable at all. If anyone else has anything else I can try it would be a big help. I have tried searching on google but dont find a whole lot of information. I just wish I could figure this out its got to be something I did or something stupid that I am missing.
There are a couple of next steps you can take.
If the problem is a software configuration issue, then it is possible that you will see the reason for the FC in the logcat.
The system logcat is designed as a "circular buffer" (in a way that it has a maximum size) - once you fill it to capacity, each new record which is added to the end causes information at the beginning to be lost. But, this also means that if a FC occurs, so long as you "dump the logcat" within a reasonable period of time after the FC happens, you will capture the moment in time that the FC occurred,
Generally, the "logcat" buffers get filled to capacity quite quickly at boot time (because there is lots and lots of "android" app activity), and quite a bit slower after the phone has been completely booted. If you are trying to capture a logcat event during the first boot, you need to continuously capture output to a file on your PC (it will be quite large) - but once the phone has completed booting, so long as you "run a logcat" within 5 or 10 minutes after a FC occurs, the relevant event(s) will be in the logcat.
If you want to capture it during the first boot cycle of a freshly flashed ROM, probably you ought to have a PC attached and dump the prodigious output to a file on the PC, as in
Code:
C:\MyWindozePC> adb shell logcat -v time > LogcatFileOnMyPC.txt
So long as the ROM you have flashed has "USB debugging" turned on by default, you can run the above command about 10-15 seconds after you see the 3 skating droids, and it will continuously place output into the local file on your PC. You need to interrupt the above command (Control-C) to get it to stop; you would usually do that a few seconds after you saw the FC, and then you would know that the log entries you are looking for at the end of the file.
(Note that logcat dumps are usually huge - don't bother trying to look at them with a text file viewer on the phone - they suck at handling large files... well, at least the ones that I have tried).
You could also instrument this on the BF's phone in a way where he can capture the info to the SD card anytime he is using the phone during the day with a couple taps of the screen, and then you could look at the logcat(s) later at your leisure - for instance by using Gscript Lite, and a simple script like this:
Code:
#! /system/bin/sh
_LOGDIR='/sdcard/logcats'
if [ ! -d ${_LOGDIR} ]; then
mkdir ${_LOGDIR}
fi
_tstamp=`date +%Y%m%d-%H%M`
logcat -v time -d > ${_LOGDIR}/logcat_${_tstamp}.txt
With this method, you just need to train him like a monkey to press the right keys after a FC occurs. If he's a clever monkey, you could even train him to send the logcat files to you via e-mail.
If the problem is due to an intermittent hardware issue with the phone, that will be tougher to identify. About the best you can do to make that determination is to return the phone software to stock and use the phone without installing any apps for a reasonable period of time and see if the problem continues to occur.
cheers
bftb0
Thank you for the detailed reply bfbt0 I was about to msg you when you responded.
I will have to give what you mentioned a try.
Is the gscript lite what I use for the adb shells or do I need another app as well. I have never done anything with adb or if I have it was something simple.
To clarify I would have to get his phone to fc again which is easy to do and then run a logcat. It sounds easy through the pc I just want to make sure I do it right. I would make a folder dedicated to where the logcats would be stored and then run it in the gscript lite? Meaning run the first code you posted.
Update ~ Never mind I found you had to have android sdk on your pc Im downloading that now. I still may need help tho.
labnjab said:
Update ~ Never mind I found you had to have android sdk on your pc Im downloading that now. I still may need help tho.
Click to expand...
Click to collapse
GScript Lite is a free app on the market. It was put together by XDA member "rogro", and he has a paid version as well if you want to throw a couple bucks his way.
Using the script above with Gscript (Lite or Pro), you don't need to be tethered to a computer nor set up the SDK and drivers. (Only when you want to capture a full first ROM boot do you need to use a PC (because the logfile grows so big in that specific case).
If you can force the FC to occur, then using the Gscript Lite script I showed above will capture the information you want.
bftb0
PS There is a brief outline of how you load a script into Gscript Lite in that "Universal Root for Dummies" thread over on AF.
cheers
Thank you I will try that tonight and hopefully can figure out what the issue is
labnjab said:
To clarify I would have to get his phone to fc again which is easy to do and then run a logcat. It sounds easy through the pc I just want to make sure I do it right. I would make a folder dedicated to where the logcats would be stored and then run it in the gscript lite? Meaning run the first code you posted.
Click to expand...
Click to collapse
That code I posted checks to see if a folder exists, and if not creates it - /sdcard/logcats
No need for you to do it manually; the first time the script runs it creates that folder
But, yeah - wait for the FC to happen and then run that script within the next couple of minutes (no real hurry). It is also useful to make note of the time the phone displays when the FC occurs - it will be easier to find things in the logcat file by timestamp if you do that.
bftb0
Thank you I will do that as well. Thanks also for taking the time to help me.
I did the code on my phone to make sure I did it right and it gave me an error
says cannot create/logcat_20110222-1558.txt read only file system
did I do something wrong, just want to make sure that I can get it right before attempting it on his phone tonight. Thanks in advance.
labnjab said:
I did the code on my phone to make sure I did it right and it gave me an error
says cannot create/logcat_20110222-1558.txt read only file system
did I do something wrong, just want to make sure that I can get it right before attempting it on his phone tonight. Thanks in advance.
Click to expand...
Click to collapse
If you typed that script in by hand, you made a typo.
I checked it by cutting and pasting it - and then I tested it afterward, and it worked.
Probably you bolluxed up the _LOGDIR variable, or you inserted a space in the logcat command where there should not be one.
I would suggest that you cut and paste, rather than type.
Hmmmm... it occurs to me that those little "scrolling CODE text boxes" don't render correctly on the phones browser. Here's the same script, but without enclosing it in [ CODE ] [ /CODE ] tags:
#! /system/bin/sh
_LOGDIR='/sdcard/logcats'
if [ ! -d ${_LOGDIR} ]; then
mkdir ${_LOGDIR}
fi
_tstamp=`date +%Y%m%d-%H%M`
logcat -v time -d > ${_LOGDIR}/logcat_${_tstamp}.txt
Thank you for all your help. I got it to work and come to find out I didnt even need to use that program because it hasnt forced closed yet. He said he wiped the phone a bunch of times the other day when he was trying to get it back up and running when it forced closed on him while at work and now i rebooted it and backed it up and that usually caused a problem, so far so good.
I am tho going to format the sd card and redo the rom again just to be sure this problem doesnt happen again. Thank you again for all the help.
On some builds (even though it shouldn't be required) it is necessary to wipe multiple times. On Tazz's earlier builds of GB, people reported having to wipe 3x or more to get it running smooth. Always make sure you do a nand backup before flashing in the future lol. Hopefully the phone stays running good! If not, people are always here to help!
Sent from my Ginger Tazz using XDA App

[Q] Nook Tablet Prtitions

Ok here is the deal short and sweet . I have a nook tablet 8gb best i can tell it has NO partitions on the internal flash section.
I have used ADB to confirm this i used parted this way to check ... type in p or print and nothing shows.
step 1 adb
C:\ADB>adb devices
List of devices attached
0000000000000000 recovery <-----first error
but adb will connect thru adb shell
so i type in parted /dev/block/mmcblk0
~ # parted /dev/block/mmcblk0
parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) <-----seems to be working now the print command
(parted) print
print
print
(parted)
nothing.
I followed another post on here that gave commands to re-partition but when i finish there never there.
I can also boot to CWM from a sd card ...... and have a CM7 system sdcard that does work fine
But would love to fix the nook tablet so its just back to factory state for my daughter. if i could get some help on makeing partitions stay put after i write them i think i could move on with this project.
Alternative If someone would point me in the right direction to permanently fix partitions so CM7 would install to the internal flash i could live with that.
Thanks for reading this far.
http://raywaldo.com/2012/06/how-to-un-brick-a-nook-tablet-8gb-or-16gb/
Sent from my CM 10 nook. Thanks devs.
Yes , i have tried this countless times different sd cards even bought a new 4 and 8 (4 speed) sdcard no luck even when it does boot from it the
red X show up and it reboots. So the best i can figure it has to have the factory partitions intact before this install will work. I even tried a clockwork mode recovery from another NT 8gb no luck o this either.
Im on week 2 of fighting with this thing i have learned alot but willing to learn more.
Thanks for the input
edit
i guess i should have posted that when a recovery sdcard does work it will run for about 3 seconds ten show a red ! in a book
Sounds like a bad emmc or other hardware in the nook. Try to warranty it, the worse they can do is say no. Don't lie to them but you may want to be selective about the customizing you have done.
Sent from my CM 10 nook. Thanks devs.
Well thats kinda the bad part it was used when i got it. And " I " done the damage. So i would not try and return it. But yes the emmc is blank dir under adb the only things i can find are in sbin folder and a few odd place like that.
I know this much if i ever fix this im writing a BIG tutorial on here cause i caint be the only one lol
Daddy.Mouse said:
Well thats kinda the bad part it was used when i got it. And " I " done the damage. So i would not try and return it. But yes the emmc is blank dir under adb the only things i can find are in sbin folder and a few odd place like that.
I know this much if i ever fix this im writing a BIG tutorial on here cause i caint be the only one lol
Click to expand...
Click to collapse
I don't think you necessarily broke it. Unfortunately components fail, sounds like possibly some bad blocks. If you can run it from SD pop CM 10 from iamafanof.WordPress.com on it and call it a day.
Sent from my CM 10 nook. Thanks devs.
Lol i would but im subborn i wanna fix it so maybe i can help others later I trying a AdamOutlerUbuntuTotalReFlash but it dont seem to boot at all Oh well back to the drawing board
Daddy.Mouse said:
Lol i would but im subborn i wanna fix it so maybe i can help others later I trying a AdamOutlerUbuntuTotalReFlash but it dont seem to boot at all Oh well back to the drawing board
Click to expand...
Click to collapse
Stubborn or not bad blocks means not fixing it unless you replace components. If it is indeed hardware related no matter what you try it isn't going to work.
Sent from my CM 10 nook. Thanks devs.
Daddy.Mouse said:
...
Alternative If someone would point me in the right direction to permanently fix partitions so CM7 would install to the internal flash i could live with that.
Thanks for reading this far.
Click to expand...
Click to collapse
The info in these two threads might be helpful:
http://forum.xda-developers.com/showthread.php?t=1515788
http://forum.xda-developers.com/showpost.php?p=23921174&postcount=15
Thanks for all the help At least ive got something new to try thanks again.
SlowCobra96 its not completly hopeless till its laying on the ground with my foot in it screen busted and in a thousand parts lol I will keep trying .
I think if i could re write the partitions and make the stay there would be some hope.
digixmax thanks for the links imma give it a try in a few i hadent seen them links before
Daddy.Mouse said:
Thanks for all the help At least ive got something new to try thanks again.
SlowCobra96 its not completly hopeless till its laying on the ground with my foot in it screen busted and in a thousand parts lol I will keep trying .
I think if i could re write the partitions and make the stay there would be some hope.
digixmax thanks for the links imma give it a try in a few i hadent seen them links before
Click to expand...
Click to collapse
The reason they aren't "staying" is probably the result of an impending failure. The corruption in the blocks gets pushed to the side during a format, at least for a short period, then the corrupted blocks start getting read/accessed causing data corruption and/or further block failure. Now without having it in front of me I can't guarantee this is the problem but I strongly believe it is based on the description.
Sent from my CM 10 nook. Thanks devs.
Slight update i now have the partitions back .... i think. Now when i turn it on with no sdcard in it finally boot loops the N logo.
It will show N then as soon as i see "read forever" it reboots .... Getting closer
Daddy.Mouse said:
Slight update i now have the partitions back .... i think. Now when i turn it on with no sdcard in it finally boot loops the N logo.
It will show N then as soon as i see "read forever" it reboots .... Getting closer
Click to expand...
Click to collapse
Update NOOK is now running with no problems !!!! I will write up a help file for how i came from no partitions to fulling working again .
Just want to say thanks to all the folks that pointed me here and there for different things to read and also all the help you guys and gals gave
Ohh Happy days !!!!
No ive not forgot about writing a tut just trying to reproduce my findings again before i write.

[Q] Mlais MX28 mounting /system read-write

Please excuse asking questions as a first post, but I'm at the stage where I'm stumped and a search isn't helping.
Mlais MX28 fresh from MM pre-rooted. Managed to get the ROM backed up and CWM installed with Rua1's excellent MTK Droid Root & Tools. However, removing the Chinese useless (for me - no offence intended) apks proved not to be happening from the one-click button in that excellent piece of software. No bother, thought I, I'll just use adb and remove the relevant apks manually from /system/app. Famous last words.
Here's where things get really odd. I can mount root fine using the usual procedure but mount -o rw,remount /[email protected] /system works once and once only. Even stranger is that the first time gets you a rw mounted filesystem for about 10 seconds, at which point it gets remounted ro and no amount of faff will get it back to rw without a full power off and restart. All it does is spits out
Code:
mount: Read-only file system
Any ideas, please? I suspect there's some write protection going on but I haven't the first idea where to look.
Edit: Having done a little more searching on this issue, it seems there's a few Acers with the same behaviour, caused by a compiled-in kernel option. Looks like it may well be "wait for a custom ROM" is the answer. Not sure if rolling our own is possible unless anyone knows where to get the Mediatek sources for this device from?
Anyway, :good: to all those who have viewed my question. It's appreciated.
Edit 2: There's an S4UI ROM on needrom<dot>com that is rumoured to have solved this issue. Note that if you have installed CWM using the "magic" MTK Droid Root & Tools method, chances are you can't mount /system rw using ADB in CWM either - I suspect they share the same kernel. I haven't tried the S4UI ROM myself as the recovery needed to install it seems to be in Chinese. Possible solution for anyone with a grasp of that language and script but that someone isn't me
[Q] Mlais MX28 Recovery in Chinese Any help with translation
Hello, bud Any help yet also gut stuck in this.
I'm afraid not at the moment. The S4UI ROM on needrom does indeed enable /system rw but the WiFi and Bluetooth will not activate. Replacing mtk_stp_wmt.ko in /system/lib/modules/ with the version from the stock ROM that should fix this issue, doesn't fix this issue. It's a shame as the S4UI ROM is rather pleasant to use and if I could get that fully operational I expect I would be quite happy with this device. Oddly, the stock ROM came back with a different MAC for the WiFi. As I restored from a backup created with MTKDR&T, this is a little perplexing.
I'll update if I find any more clues.
{Possible solution/nasty hack]
Here's a way to get full /system access on the stock ROM. It requires
Clockwork Mod recovery
ADB
Courage
Install/create Clockwork Mod with MTKDR&T. Now boot into recovery by holding Vol+ and power until the boot selection screen appears and then select recovery with Vol+ and press Vol- to accept.
Do not mount /system in CWM.
On your ADB equipped computer, start
Code:
adb shell
Now issue the following at the root shell prompt:
Code:
tune2fs -e continue /dev/block/mmcblk0p5
Reboot the system and enjoy the power of full root.
This may well be a nasty hack. I was convinced the issue was a protected kernel module but it seems the ext4fs image of the system block is corrupt in some way and the default error action is to mount -o ro. We're disabling that default action and letting the mount remain unchanged.
As always with these things, proceed at your own risk. If you break it, you have the privilege of keeping both bits.
Good way around mate, but risky as no CWM yet installed, seem's the mobile gut some bug problem, should expect an official update rom soon enough, Root method you used for this? i intend flashing Clockwork Mod can seem to understand fully as i'm new to android development and customizing, again problem with battery do you get a full day (few moment on screen) light usage? Feel its no actual 25000mah on board.
codedmax said:
Good way around mate, but risky as no CWM yet installed, seem's the mobile gut some bug problem, should expect an official update rom soon enough, Root method you used for this? i intend flashing Clockwork Mod can seem to understand fully as i'm new to android development and customizing, again problem with battery do you get a full day (few moment on screen) light usage? Feel its no actual 25000mah on board.
Click to expand...
Click to collapse
It appears there's an fsck implementation in the shell of CWM as well.
Code:
e2fsck -pfv /dev/block/mmcblk0p5
That should fix most of the errors in the filesystem.
The device came with su and SuperSU installed but it was fairly useless without /system access.
CWM can be easily installed using MTK Droid Root & Tools to extract the boot image, auto-patch, build CWM and install the lot. It really is a slick piece of software.
As for the battery, an even bigger issue is the supplied charger which is puny. Of course, looking at the battery and then looking at a proper, honest-to-goodness 2.2Ah Panasonic 18650 cylindrical cell you have to wonder if 2.5Ah isn't awfully optimistic.
Chron0s said:
It appears there's an fsck implementation in the shell of CWM as well.
Code:
e2fsck -pfv /dev/block/mmcblk0p5
That should fix most of the errors in the filesystem.
The device came with su and SuperSU installed but it was fairly useless without /system access.
CWM can be easily installed using MTK Droid Root & Tools to extract the boot image, auto-patch, build CWM and install the lot. It really is a slick piece of software.
As for the battery, an even bigger issue is the supplied charger which is puny. Of course, looking at the battery and then looking at a proper, honest-to-goodness 2.2Ah Panasonic 18650 cylindrical cell you have to wonder if 2.5Ah isn't awfully optimistic.
Click to expand...
Click to collapse
Very Well concerned,
once again good job, but how do i go about implementing this,
would you be kind enough to put in some more details on the file system code and CWM flashing with MTK Droid root & Tool did you manage to get a translation on the chinese langauage recovery problem,
(a tutorial is just fine) Thanks alot bud.
Okay, give me a little time to set it all up for screenshots as I don't generally use Windows unless I have to. It's all fairly straightforward. The CWM installation is four clicks and some waiting and repairing the /system block is a couple of commands.
Oscarblue48 has a tutorial on installing CWM on Mediatek devices here or here if your MX28 isn't rooted which is the procedure I followed. Then it's just a case of booting into CWM, connecting your device to USB and using adb's shell to fsck the filesystem on that block.
really nice, okay as you say,
i would look forward to it (some screen shots aid), in the main time with full study & concentration on the CWM tutorial you gave, quite interesting if you ask me.
#back to studying, looking forward to a bug free final optimization of the Mlais MX28 as its a great buy for such a price.
codedmax said:
really nice, okay as you say,
i would look forward to it (some screen shots aid), in the main time with full study & concentration on the CWM tutorial you gave, quite interesting if you ask me.
#back to studying, looking forward to a bug free final optimization of the Mlais MX28 as its a great buy for such a price.
Click to expand...
Click to collapse
Sorry for the delay, I ran into a few issues and had to work out what was going on. Basically the e2fsck in CWM cannot write back to the block device so is useless. I extracted the system.ext4.img, added it as a file backed memory disk on my main computer and ran an e2fsck from there, which found and fixed the errors in the FS image. Writing that back after changing a few MD5sums in the file MTKDR&T creates allowed me to flash it back.
However it makes absolutely no difference to the mount behaviour. It still drops back to ro without the tune2fs -e continue set so that is, barring someone else coming up with a more elegant fix, the workaround. In a nutshell, follow the guide for either root or CWM recovery installation that others have posted linked above (no point wasting board space on repetition) and then simply follow my instructions for setting the error behaviour on the mmcblk0p5 slice and you should be good to go.
It's still an awful hack IMHO but, since there's nothing else so far that works, it's the uncomplicated way to get full root. Most of us will install CWM anyway, so it's no big chore just to boot into recovery and type one command "tune2fs -e continue /dev/block/mmcblk0p5" at the ADB shell.
Chron0s said:
Sorry for the delay, I ran into a few issues and had to work out what was going on. Basically the e2fsck in CWM cannot write back to the block device so is useless. I extracted the system.ext4.img, added it as a file backed memory disk on my main computer and ran an e2fsck from there, which found and fixed the errors in the FS image. Writing that back after changing a few MD5sums in the file MTKDR&T creates allowed me to flash it back.
However it makes absolutely no difference to the mount behaviour. It still drops back to ro without the tune2fs -e continue set so that is, barring someone else coming up with a more elegant fix, the workaround. In a nutshell, follow the guide for either root or CWM recovery installation that others have posted linked above (no point wasting board space on repetition) and then simply follow my instructions for setting the error behaviour on the mmcblk0p5 slice and you should be good to go.
It's still an awful hack IMHO but, since there's nothing else so far that works, it's the uncomplicated way to get full root. Most of us will install CWM anyway, so it's no big chore just to boot into recovery and type one command "tune2fs -e continue /dev/block/mmcblk0p5" at the ADB shell.
Click to expand...
Click to collapse
Greetings bud, gut CWM installed, all thanks to you (indeed greatful), have you been lucky with any custom rom as of now that works efficently on your device?
I seem to find a few bug here and there on the manufacturer stock, puny wifi & gps lock in, slight screen maulfuctions a little times.
As with most mtk gps can not finding a lock in hows it with your device.
codedmax said:
Greetings bud, gut CWM installed, all thanks to you (indeed greatful), have you been lucky with any custom rom as of now that works efficently on your device?
Click to expand...
Click to collapse
None of the custom ROMs on needrom work correctly which is a shame. The stock ROM's UI is awful.
codedmax said:
I seem to find a few bug here and there on the manufacturer stock, puny wifi & gps lock in, slight screen maulfuctions a little times. As with most mtk gps can not finding a lock in hows it with your device.
Click to expand...
Click to collapse
Now you have root you can use FasterGPS from FDroid to intialise the gps.conf file with appropriate settings for your location. My GPS is rock solid now, even in a moving vehicle. Not had any screen malfunctions. What version is your stock ROM? Mine's the 20140221 update.
Chron0s said:
None of the custom ROMs on needrom work correctly which is a shame. The stock ROM's UI is awful.
Now you have root you can use FasterGPS from FDroid to intialise the gps.conf file with appropriate settings for your location. My GPS is rock solid now, even in a moving vehicle. Not had any screen malfunctions. What version is your stock ROM? Mine's the 20140221 update.
Click to expand...
Click to collapse
Hello great bud,
Sorry for late reply, been up with alot on my plate from work lately, gps has been improved upon using that wonderful app "FasterGPS" now able lock in under a split couple of min not as before were it take like forever *Nice*
gut the same stock version "20140221" gusse its down to my own unit with the screen ish
Did a little searching around found a recent update from a online retailer outlet via their forum "merimobiles"
forum.merimobilesdotcom.previewdnsdotcom/showthread.php?465-Unified-thread -for-Mlais-MX28-stock-ROM-updates
Hope im not infringing on any xda TOS as i just seek some help.
Thanks
Please i need help, i have a mlais mx28 buy in buyincoins, with the refer gordete200, it´s all ok.
i´m very happy with the mlais mx28, but i used a 8 gigas sd card, it´s all ok.
My problem: i have install with flashtools the new rom stock update : mx28_0312_N2.rar from the official mlais mx28 web
When i have install this ultimate ( update ) ROM, it´s was with reebots, and the wifi and blutooth crash 0_0 !!! what happend?
I back to the Rom stock : 0115 but the sd partitions was changed : 1 gb for apps, and 1.75 gb for internal memory, it´s very strange, before install the Update, i had 2,3 gb for apps and 256 gb for internal memory...
I´m very worry, the actual problem is the sd card:
With 8 gb sd card class 10, it´s all ok, all correct, but when i put the 16 gb sd card class 10, it´s don´t mount sd correctly always.
I´m very crazy for all...
codedmax said:
Hello great bud,
Sorry for late reply, been up with alot on my plate from work lately, gps has been improved upon using that wonderful app "FasterGPS" now able lock in under a split couple of min not as before were it take like forever *Nice*
Click to expand...
Click to collapse
Good stuff. Once you have the gps.conf set up, try using Mobileuncle Tools to pull in the EPO (extended prediction orbit, basically a nice big list of keplers for the satellites so it knows which to expect to be in view at a given time without having to scan the sky for what's actually there) data which should stabilise the GPS even further.
codedmax said:
gut the same stock version "20140221" gusse its down to my own unit with the screen ish
Did a little searching around found a recent update from a online retailer outlet via their forum "merimobiles"
forum.merimobilesdotcom.previewdnsdotcom/showthread.php?465-Unified-thread -for-Mlais-MX28-stock-ROM-updates
Hope im not infringing on any xda TOS as i just seek some help.
Thanks
Click to expand...
Click to collapse
I wonder if it's the bodged Trebuchet they're using? It's a bit of a disaster as they've taken the CM launcher, bodged bits of MIUI into it and given the whole thing a "that'll do" look and feel. I replaced it with the real Trebuchet after a thorough decrapify, along with the AOSP stock keyboard. There's a "modified" apk of Trebuchet (all the dev did was lower the base API level so it would install on 4.1) floating about on the 'net somewhere. The various KitKat-alikes work fairly well but I wanted something open source that I could slam into /system/app without worrying.
It has taken a lot of faff to get to this stage but I now have a very usable and fast device for not a great deal of outlay.
gordo100 said:
Please i need help, i have a mlais mx28 buy in buyincoins, with the refer gordete200, it´s all ok.
i´m very happy with the mlais mx28, but i used a 8 gigas sd card, it´s all ok.
My problem: i have install with flashtools the new rom stock update : mx28_0312_N2.rar from the official mlais mx28 web
When i have install this ultimate ( update ) ROM, it´s was with reebots, and the wifi and blutooth crash 0_0 !!! what happend?
I back to the Rom stock : 0115 but the sd partitions was changed : 1 gb for apps, and 1.75 gb for internal memory, it´s very strange, before install the Update, i had 2,3 gb for apps and 256 gb for internal memory...
I´m very worry, the actual problem is the sd card:
With 8 gb sd card class 10, it´s all ok, all correct, but when i put the 16 gb sd card class 10, it´s don´t mount sd correctly always.
I´m very crazy for all...
Click to expand...
Click to collapse
Do you have a backup of the original ROM and scatter (partition layout) file? You really should (read: MUST) back up these devices before flashing new firmware as there's often bits missing, as you found with the WiFi and Bluetooth issue. MTK Droid Root & Tools will create a useful backup of the partition layout and contents for you without too much difficulty.
Please do not write to the preloader partition with the SP flash tool. Once the preloader is corrupt, your device is a brick which only JTAG will recover. I seriously doubt anyone has a JTAG solution for this device right now. There is no need to rewrite the preloader at all in any case so simply deselect the preloader block in SP Flash tool before downloading.
As for the SD cards, you need to make sure your card is formatted FAT, not NTFS, and the card must be partitioned correctly, i.e. the FAT partition must be the first primary. The MX28 will accept a card of up to 32GB if I recall correctly, which is the limit of SD-HC. Clockwork Mod can format your card for you.
Chron0s said:
Do you have a backup of the original ROM and scatter (partition layout) file? You really should (read: MUST) back up these devices before flashing new firmware as there's often bits missing, as you found with the WiFi and Bluetooth issue. MTK Droid Root & Tools will create a useful backup of the partition layout and contents for you without too much difficulty.
Please do not write to the preloader partition with the SP flash tool. Once the preloader is corrupt, your device is a brick which only JTAG will recover. I seriously doubt anyone has a JTAG solution for this device right now. There is no need to rewrite the preloader at all in any case so simply deselect the preloader block in SP Flash tool before downloading.
As for the SD cards, you need to make sure your card is formatted FAT, not NTFS, and the card must be partitioned correctly, i.e. the FAT partition must be the first primary. The MX28 will accept a card of up to 32GB if I recall correctly, which is the limit of SD-HC. Clockwork Mod can format your card for you.
Click to expand...
Click to collapse
Many thanks for your help. I have a back up of my mlais, i have a back up with mtk droid and tools 2.5.3 ( new version ), but when i put it on the flash tools, the cache and user is missing, and it´s imposible to download it. and then i put a recovery CWM on the mlais with droid and tools ( very easy ), and use a nandroid back up, it´s no problem, but the internal sd partition is always changed : 1 gb for apps and 1.75 for sd internal, i´m very sad because i would like back to the 2,3 gb for apps ( original partition )
Yes... always fat32 sd cards of course, but i have problems with the sd up to 8 gb, the mlais freeze, or sd desmount ( it´s imposible sometimes write in sd external ) i don´t find the problem with this... i have the rom stock : 115.
Other problem, i would like to up the ultimate ROM stock 221. but the wifi and bluetooth crash, and reboot the phone sometimes ( terrible...) , what can i do ? your solution is don´t stick the PRELOADER on the Flashtool when i upload the firmware ? it´s correct? ( i think that if don´t mark the preloader it´s imposible flash... ?¿ )
Many thanks for your help !
gordo100 said:
Other problem, i would like to up the ultimate ROM stock 221. but the wifi and bluetooth crash, and reboot the phone sometimes ( terrible...) , what can i do ? your solution is don´t stick the PRELOADER on the Flashtool when i upload the firmware ? it´s correct? ( i think that if don´t mark the preloader it´s imposible flash... ?¿ )
Click to expand...
Click to collapse
No, what I'm saying is we don't yet know why the WLAN and Bluetooth stop working when a different ROM from the one flashed at the factory is installed. There is clearly some mechanism at work here that is blocking those two devices after an update and it's not the usual shared objects as it is on other devices. It also doesn't seem to be NVRAM related as the MAC and BDaddr remain once the old firmware is re-flashed.
This same problem occurs with all the custom ROMs on needrom.
The reason I say do not needlessly flash the preloader is the danger of a full brick from which you cannot recover. The preloader code very rarely changes - its only purpose is to provide an interface to SP flash tools or boot; think "BIOS" in PC terms - so it is a pointless risk. You most certainly can flash the other blocks with the preloader block deselected.
The bottom line right now is stick with the factory ROM, install CWM, apply the system mount fix and use Xposed and suchlike to customise until we come up with something a little more sensible or at least find out why the WLAN and Bluetooth stop working.
Given that the Wiko Darkmoon is based on the same SoC and has full sources available <EDIT: It isn't. It's just the kernel as usual.>, it may be prudent to wait until someone with more clue than I has a look at what makes these things tick.
Chron0s said:
No, what I'm saying is we don't yet know why the WLAN and Bluetooth stop working when a different ROM from the one flashed at the factory is installed. There is clearly some mechanism at work here that is blocking those two devices after an update and it's not the usual shared objects as it is on other devices. It also doesn't seem to be NVRAM related as the MAC and BDaddr remain once the old firmware is re-flashed.
This same problem occurs with all the custom ROMs on needrom.
The reason I say do not needlessly flash the preloader is the danger of a full brick from which you cannot recover. The preloader code very rarely changes - its only purpose is to provide an interface to SP flash tools or boot; think "BIOS" in PC terms - so it is a pointless risk. You most certainly can flash the other blocks with the preloader block deselected.
The bottom line right now is stick with the factory ROM, install CWM, apply the system mount fix and use Xposed and suchlike to customise until we come up with something a little more sensible or at least find out why the WLAN and Bluetooth stop working.
Given that the Wiko Darkmoon is based on the same SoC and has full sources available <EDIT: It isn't. It's just the kernel as usual.>, it may be prudent to wait until someone with more clue than I has a look at what makes these things tick.
Click to expand...
Click to collapse
Many thanks Chronos!, The problem is also with the official ROMS on mlais.com/mlaismx28 i don´t understand it...
Please i need help to back restore the partitions of my sd internal ( ROM ), i would like back to 2,3 gb for apps, actually i have only 0,98 gb and 1,75 gb internal store.
I think that the solution is back up for flash tools and reflash with the rom stock ( the back up of mlais mx28 of my friend, he have other new mx28 )
But my BIG problem with the flash with flash tools is the USER DATA and CACHE is always empty, and then it´s imposible to reflash it it´s always and error : Rom changed PTM ...
Please, what can i do for have USER DATA and CACHE with mtk droid and tools 2.5.3 versión?? ( in this version to click User data and Cache with to do the back it´s imposible, this option is missing in 2.5.3. version )
http://dl.xda-developers.com/attachdl/b2f11c741aab592a8f66616d932af983/533c2dcc/2/6/6/4/5/2/2/Sin_t_tulo.jpg
[ROM] Official Update
Hello guys, there's a new rom update for the mx28
Official Mlais MX28 version: Mlais_MX28_20140312
www.needrom.com/mobile/mlais-mx28-2/
Try it out seems, it works perfect.
Cheers!!

[Mod] Disable ZRAM [Swap] in MM - Huawei Ascend XT

I thought I'd bring this over from the Honor 5x for the Huawei Ascend XT too it works without any problems
Original post > https://forum.xda-developers.com/moto-g4/development/mod-disable-zram-t3435613
We hate zram. This easy mod will disable it on the stock Moto G4 rom. In our experiences with disabling zram we've been able to notice performance gains on devices from 1-3gb of ram (Moto E 2015, Moto G 2014, Honor 5X, Huawei GX8).
8/13/16 Update: Now flashable via TWRP.
1. Have TWRP and MAKE A NANDROID BACKUP BEFORE YOU DO ANYTHING. I am not responsible if you break your phone. If you don't already know how to restore your device to the way it was when you bought it, do not do any of this.
2. Flash via TWRP:
Zram Off:
To return to stock (I cannot promise this is exactly the same as the G4 Plus. If any G4 Plus users want to send me a hastebin of the /system/etc/init.qcom.zram.sh file to compare that would help).
Zram On:
This has been tested working on the XT1625 and likely works on the G4 Plus as well. If this works for you on a different variant, please leave a reply and I'll do my best to update this post.
If for some unholy reason you'd like to turn it back on, follow the same process copying your backed up init.qcom.ram.sh file back to /system/etc.
Thanks to @EarlyMon for his edits that allow us to keep zram disabled without having to run terminal commands at every boot.
Click to expand...
Click to collapse
Here's the files >>
H1611_Enable_Zram_flashable.zip
H1611_Disable_Zram_flashable.zip
Thanks go to @redbeard1083 and @EarlyMon
And also to @divineBliss for the Fix to re-enable the Zram / Swap after rooting
Did you confirm ZRAM was enabled on stock XT? Mine seems to be already disabled based on RAM Truth app.
divineBliss said:
Did you confirm ZRAM was enabled on stock XT? Mine seems to be already disabled based on RAM Truth app.
Click to expand...
Click to collapse
I just don't understand why there's a partition for it if we can't use it.
Our phone says it has 2gb of RAM but .23gb is used for system while our phone shows that we have 2gb usable ram. 1.77gb +Zram Partition would be 2gb usable ram. I'm thinking zram only clicks in whenever the ram is low.
If you have a look at the stock XT /system/etc/init.qcom.zram.sh file, that script only enables ZRAM for phones that have less than 1 GB TOTAL RAM. The XT has 2GB, so this mod is totally unnecessary and doesn't need to be done on our phone as it's not using the ZRAM by default. No wonder I didn't feel any improvement.
clsA said:
I thought I'd bring this over from the Honor 5x for the Huawei Ascend XT too it works without any problems
Here's the files >> Disable-Enable-Swap-Marshmallow
Thanks go to @redbeard1083 and @EarlyMon
Click to expand...
Click to collapse
divineBliss said:
If you have a look at the stock XT /system/etc/init.qcom.zram.sh file, that script only enables ZRAM for phones that have less than 1 GB TOTAL RAM. The XT has 2GB, so this mod is totally unnecessary and doesn't need to be done on our phone as it's not using the ZRAM by default. No wonder I didn't feel any improvement.
Click to expand...
Click to collapse
You should have done more reading
https://forum.xda-developers.com/showpost.php?p=66147304&postcount=69
https://forum.xda-developers.com/showpost.php?p=66154058&postcount=71
https://forum.xda-developers.com/showpost.php?p=66154808&postcount=72
Thanks for your detailed explanation about this. As a programmer, I tend to believe what I see in code, rather than what someone is telling me. But apparently, in this case the code is misleading, in particular the comment saying that ZRAM is only enabled on devices with less than 1GB of RAM.
But you're totally correct, enable_swap indeed seems to enable ZRAM. I re-enabled the enable_swap statement in the script on my device, and after rebooting the /proc/swaps file shows the following:
/dev/block/zram0 partition 743420 62208 -1
So again, thanks for investigating this, giving us the ability to disable ZRAM, and for being patient with people who do not believe you
Click to expand...
Click to collapse
@clsA,
I've done plenty of reading and testing on the XT. All this stuff you are quoting is from other phones with different specs and different init.qcom.zram.sh.
My phone shows no swap when I reboot with stock init.qcom.zram.sh and
check with "cat /proc/swaps". Can others please check and see what your XT shows?
clsA said:
You should have done more reading
https://forum.xda-developers.com/showpost.php?p=66147304&postcount=69
https://forum.xda-developers.com/showpost.php?p=66154058&postcount=71
https://forum.xda-developers.com/showpost.php?p=66154808&postcount=72
Click to expand...
Click to collapse
divineBliss said:
@clsA,
I've done plenty of reading and testing on the XT. All this stuff you are quoting is from other phones with different specs and different init.qcom.zram.sh.
My phone shows no swap when I reboot with stock init.qcom.zram.sh and
check with "cat /proc/swaps". Can others please check and see what your XT shows?
Click to expand...
Click to collapse
OK so you can explain these Test devices with locked bootloaders having 722.00mb Swap ?
That's what my phone had when it was new until I disabled it with the zip I posted above and now it's gone for good
I'm confused at this point .. I enable Swap with a SH Script or by flashing the enable_swap.zip and all I get in ram truth now is 0 Swap
This phone is really starting to get on my nerves
I've been looking up crap seems like enable_swap is empty and is corrupted.
I wonder what would happen if someone uploaded these following files would that maybe fix our issue with no zram?
/System/bin/enable_swap
/Swapon
/Swapoff
/System/ECT/init.qcom.zram.sh
You know case matters with Linux, right?
Which is it ....empty or corrupt? Mine is 9.8k.
dabadguycr said:
I've been looking up crap seems like enable_swap is empty and is corrupted.
I wonder what would happen if someone uploaded these following files would that maybe fix our issue with no zram?
/System/bin/enable_swap
/Swapon
/Swapoff
/System/ECT/init.qcom.zram.sh
Click to expand...
Click to collapse
divineBliss said:
You know case matters with Linux, right?
Which is it ....empty or corrupt? Mine is 9.8k.
Click to expand...
Click to collapse
Mines 0kb.
See attached...
dabadguycr said:
Mines 0kb.
Click to expand...
Click to collapse
Here's my init.qcom.zram.sh. The other two are links to busybox which I installed from the Play Store.
dabadguycr said:
I've been looking up crap seems like enable_swap is empty and is corrupted.
I wonder what would happen if someone uploaded these following files would that maybe fix our issue with no zram?
/System/bin/enable_swap
/Swapon
/Swapoff
/System/ECT/init.qcom.zram.sh
Click to expand...
Click to collapse
divineBliss said:
Here's my init.qcom.zram.sh. The other two are links to busybox which I installed from the Play Store.
Click to expand...
Click to collapse
So swapon and swapoff links to BusyBox?
Maybe we just need to delete those files.
Look at your phone and tell me if they are links or not.
Also, what exactly are you wanting to do as far as swap/ZRAM enabling goes?
dabadguycr said:
So swapon and swapoff links to BusyBox?
Maybe we just need to delete those files.
Click to expand...
Click to collapse
divineBliss said:
Look at your phone and tell me if they are links or not.
Also, what exactly are you wanting to do as far as swap/ZRAM enabling goes?
Click to expand...
Click to collapse
I'm trying to figure out why we no longer have zram when we did before and what did it change.
So far the coding looks good in the init file. It seems to link to the places it should.
Okay, so trying to get the image like clsA posted with swap/ZRAM
enabled.
dabadguycr said:
I'm trying to figure out why we no longer have zram when we did before and what did it change.
So far the coding looks good in the init file. It seems to link to the places it should.
Click to expand...
Click to collapse
divineBliss said:
Okay, so trying to get the image like clsA posted with swap/ZRAM
enabled.
Click to expand...
Click to collapse
If you are talking about the one in the OP they do not match up at all.
Ours links to system/bin
His links to sys/modules
Can you be more specific ...... I'm not following your post.
dabadguycr said:
If you are talking about the one in the OP they do not match up at all.
Ours links to system/bin
His links to sys/modules
Click to expand...
Click to collapse
divineBliss said:
Can you be more specific ...... I'm not following your post.
Click to expand...
Click to collapse
Disregard my last post,. His flash and our init.qcom.zram.sh do match up. I think I may have clicked the wrong file whenever I was comparing them.
---------- Post added at 07:48 PM ---------- Previous post was at 07:29 PM ----------
I'm lost I can't figure out why zram isn't working for us. I've checked the files and they all seem to be set up right.
dabadguycr said:
Disregard my last post,. His flash and our init.qcom.zram.sh do match up. I think I may have clicked the wrong file whenever I was comparing them.
---------- Post added at 07:48 PM ---------- Previous post was at 07:29 PM ----------
I'm lost I can't figure out why zram isn't working for us. I've checked the files and they all seem to be set up right.
Click to expand...
Click to collapse
This should fix you right up ...............
I just confirmed that by running the if statement part of init.qcom.zram.sh commands manually from adb, that ZRAM swap becomes enabled . I positively know the else part (enable_swap) does not have any effect on turning on swap/ZRAM on my phone. After I did this and do free and swaps from adb:
[email protected]:/ $ free
total used free shared buffers
Mem: 1894486016 1848389632 46096384 0 11468800
-/+ buffers/cache: 1836920832 57565184
Swap: 757067776 88776704 668291072
[email protected]:/ $ cat /proc/swaps
Filename Type Size Used Priority
/dev/block/zram0 partition 739324 86696 -1
Remember, the if statements don't run because
MemTotalStr=`cat /proc/meminfo | grep MemTotal`
MemTotal=${MemTotalStr:16:8}
ZRAM_THRESHOLD=1048576
IsLowMemory=0
((IsLowMemory=MemTotal<ZRAM_THRESHOLD?1:0))
if [ $IsLowMemory -eq 1 ]; then
is checking if RAM size is less than 1GB, and it is not - so if you want to enable ZRAM/swap, just change
ZRAM_THRESHOLD=1048576
to
ZRAM_THRESHOLD=3145728
and reboot and it ZRAM/swap should be on.
I have not tried running like, this, so YMMV and post your results if you do. All this is modifying System partition, so keep track of what you change if you want to go back to stock without restoring from TWRP .
Clear as mud ?

Categories

Resources