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 ?
Related
I am not sure if someone else has posted this already. But I couldn't find one, so here you go. (Please let me know if I'm mistaken)
I made two small edits to the boot.img of the stock (leaked) ICS rom in order to satisfy my needs:
1. ability to run init.d scripts,
2. start adb in root.
They are very simple and anyone with a little knowledge can do it himself, but it still is convenient to have someone else do it, isn't it? I, for one, searched the forum in vein.
Here's a short explanation of what it is, and how to utilize the features.
1. init.d :
You can place your own shell scripts in /etc/init.d (you have to create the directory yourself, of course) and run them at boot time. If you prefer the CM style userinit.d, you could create a script like:
Code:
#!/system/bin/sh
# call userinit.sh and/or userinit.d/* scripts if present in /data/local
if [ -e /data/local/userinit.sh ];
then
log -p i -t
userinit "Executing /data/local/userinit.sh";
logwrapper
/system/bin/sh /data/local/userinit.sh;
setprop
fi;
if [ -d /data/local/userinit.d ];
then
logwrapper busybox
run-parts /data/local/userinit.d;
fi;
and place it in init.d (credit: CM team). After that, you can place additional scripts without remounting system partition. Just don't forget to chmod appropriately.
A word of caution: Don't go wild and install all those tweaks found in other forums without checking to see their contents. I found that most of them to be either irrelevant or even harmful to the Amaze. Remeber, we've got one of the best phones on the market and wouldn't want to ruin it by running tweaks designed for our 'lessor' siblings!
2. adb root :
I was getting tired of the inability to adb push files to user restricted directories. Also, I use Droid Explorer a lot, but was tired of its inability to obtain root even though my phone is rooted. So I basically changed the default.prop and everything is fine now.
Added benefit is that 'adb remount' works now.
Well, that's it. Too simple, but until someone comes up with a nice kernel with these mods built in, we got to live with what's available.
DISCLAIMER : Should I even include a disclaimer? Why not? This is just a stock boot.img with minor modifications to its ramdisk portion, and it shouldn't harm your phone. If it doesn't work, simply reflash the stock boot.img found in the stock/leaked ICS roms. However, I don't want anyone to brick his phone, so don't flash this unless you know what you are doing. Also, I've seen some people bricking their phones merely by trying to flash innocent files like this one. Hard to believe, but anything can happen, so I will not be responsible if you brick your phone.
INSTRUCTIONS :
0. be sure you got the ICS build 4.0.3 with the stock kernel. rooted and have installed busybox (for init.d support only).
1. download the attached boot.img.
2. place the file where adb/fastboot can find it.
3. flash it using 'fastboot flash boot boot_new.img.
4. reboot.
5. try 'adb shell' and see if you get # prompt.
6. add some scripts in /etc/init.d and reboot and see if it runs.
It runs on my Amaze running the newer leaked ICS rom (unlocked bootloader, rooted, and busybox from the market). If you have any other settings, it probably won't do any good.
That's it, guys. Hope you have some fun with it (like I did).
Just flashed your modified boot.img so far everything works as described. Going to attempt my backlight script now. Just reflashed the stock RUU as certain Roms were giving me WiFi issues. Thanks
Is this why adb remount never worked?? I asked a few people and they acted like I was crazy.. I KNEW there had to be a reason it wasn't working.. I guess my only question is why was it no one thought to do this since the ICS release except you? LOL.
Edit: And I am out of thanks, this is my mental note to come back and hit thanks when I get some to give again!
Edit2: As advertised it works flawlessly, as advertised. It will be awesome to be able to push files to my phone and all the other things I couldn't do before! A simple tweak, as you said, still appreciated!
seems like were getting some more people around here that actually contribute to the amaze forums. thanks guys...carry on
Thank you very much
Now to find some scripts to run, lol.
Thank you all for the kind words! As I said in the OP, I was curious at first about the usefulness of my post. I truly believe that, if HTC had given us more power to mod this phone, this forum would have been 10 time more active with all sorts of useful stuff. Come on HTC, you give us the best phone (even better than the One series!), and why do you want to cripple us?
Double0EK said:
Just flashed your modified boot.img so far everything works as described. Going to attempt my backlight script now. Just reflashed the stock RUU as certain Roms were giving me WiFi issues. Thanks
Click to expand...
Click to collapse
As I didn't test the boot.img with any roms around, I don't know what went wrong with your wifi. That's why I only promised it would work with the NEWER stock ICS rom. Is it possible that you flashed the boot.img to a custom rom that is based on the OLDER leak?
Additionally, if the rom dev has made his/her own mods to the boot.img, it would not be compatible with the stock boot.img like mine. I didn't add, remove or move any files.
Silentbtdeadly said:
Is this why adb remount never worked?? I asked a few people and they acted like I was crazy.. I KNEW there had to be a reason it wasn't working.. I guess my only question is why was it no one thought to do this since the ICS release except you? LOL.
Edit: And I am out of thanks, this is my mental note to come back and hit thanks when I get some to give again!
Edit2: As advertised it works flawlessly, as advertised. It will be awesome to be able to push files to my phone and all the other things I couldn't do before! A simple tweak, as you said, still appreciated!
Click to expand...
Click to collapse
Hehe, yeah it is because of some security settings that phone manufacturers chose to enable in order to minimize customer support costs, I guess. Instead, they should give us all the power (and funding, too) so that we can support each other at XDA!
mrmako777 said:
seems like were getting some more people around here that actually contribute to the amaze forums. thanks guys...carry on
Click to expand...
Click to collapse
bilek06 said:
Thank you very much
Click to expand...
Click to collapse
I've used more than two dozen smart phones in the past, including ancient pda's and even iPhones (ouch!), and I think the Amaze has the best (mix of) hardware. I, too, wish there were more devs here, and wonder why some great devs around didn't see the potential in it. Well, HTC isn't doing something right...
Dark Nightmare said:
Now to find some scripts to run, lol.
Click to expand...
Click to collapse
Hard to find anything useful for the (already mighty) Amaze, isn't it?
Things I would add for myself are like:
- house keeping: delete cache, move/copy important files from internal to external sdcard, etc.
- renice phone and input method a bit. How about acore? Probably not...
- zipalign, maybe, if you're fanatic about it.
- save logs and erase oldest ones. Gosh, what am I saying? We've got so much storage space. Oh, well. If we save the logs in external sdcard, we can view them even when the phone doesn't turn on...
Hehe, I think I should search.
I never flashed your boot.img on custom roms only on the stock. I have better WiFi with stock.
--------------------------------
It's Better To Fail At Originality
Than To Succeed In Imitation.
--------------------------------
ringochan said:
Hard to find anything useful for the (already mighty) Amaze, isn't it?
Things I would add for myself are like:
- house keeping: delete cache, move/copy important files from internal to external sdcard, etc.
- renice phone and input method a bit. How about acore? Probably not...
- zipalign, maybe, if you're fanatic about it.
- save logs and erase oldest ones. Gosh, what am I saying? We've got so much storage space. Oh, well. If we save the logs in external sdcard, we can view them even when the phone doesn't turn on...
Hehe, I think I should search.
Click to expand...
Click to collapse
Lol searching, was thinking about the v6 supercharger script, still reading into it though.
I use Cache Cleaner NG to clean. Set it on Auto with new method 2 times a day.
--------------------------------
It's Better To Fail At Originality
Than To Succeed In Imitation.
--------------------------------
Double0EK said:
I never flashed your boot.img on custom roms only on the stock. I have better WiFi with stock.
--------------------------------
It's Better To Fail At Originality
Than To Succeed In Imitation.
--------------------------------
Click to expand...
Click to collapse
I must have misread your original post. My bad. But then, I have no idea about your wifi problem with the modified boot.img. I didn't touch anything other than 2 things that I mentioned. And my wifi is working just fine. It's spooky.
Dark Nightmare said:
Lol searching, was thinking about the v6 supercharger script, still reading into it though.
Click to expand...
Click to collapse
LOLOLOL! That guy is something! I mean the guy who created the v6 script. Yes, I think his concept is right on. I may borrow some of his tweaks like app grouping and oom/minfree. I've done similar adjustments when I was still using my G1/Dream, but with Amaze with de-bloated ICS, I am already getting (almost, if not) everything he is promising we can achieve with his script.
The only lag I have is when some background services are busy. But I don't really want to make them low priority (yet).
What do you think you like to achieve using v6? I may be able to help because I myself want to experiment some.
Double0EK said:
I use Cache Cleaner NG to clean. Set it on Auto with new method 2 times a day.
--------------------------------
It's Better To Fail At Originality
Than To Succeed In Imitation.
--------------------------------
Click to expand...
Click to collapse
Hehe, you know that some script junkies won't approve of ANY apps to take over what he can do with scripts, right? I've seem many. No, I've worked with many! They refused to use GUI text editors, LOL!
ringochan said:
LOLOLOL! That guy is something! I mean the guy who created the v6 script. Yes, I think his concept is right on. I may borrow some of his tweaks like app grouping and oom/minfree. I've done similar adjustments when I was still using my G1/Dream, but with Amaze with de-bloated ICS, I am already getting (almost, if not) everything he is promising we can achieve with his script.
The only lag I have is when some background services are busy. But I don't really want to make them low priority (yet).
What do you think you like to achieve using v6? I may be able to help because I myself want to experiment some.
Click to expand...
Click to collapse
Hey, if you want to try out something cool, check this out.. http://android.mimic.ca/ it patches the services.jar file to change the OOM priority, evidently in a way more effective than the supercharger script can do it. I was going to try to include it in the latest update for my rom till I decided I wanted to work on other things.. the guy who made supercharger script helped design the patch for the file though Just thought you may be interested.
Silentbtdeadly said:
Hey, if you want to try out something cool, check this out.. http://android.mimic.ca/ it patches the services.jar file to change the OOM priority, evidently in a way more effective than the supercharger script can do it. I was going to try to include it in the latest update for my rom till I decided I wanted to work on other things.. the guy who made supercharger script helped design the patch for the file though Just thought you may be interested.
Click to expand...
Click to collapse
erm... it CAN'T be more effective than supercharging... because it IS SuperCharging
Well, 50% of it. The other 50% comes from the script when on ICS.
Why do you think that website is integrated into the latest V6 Scripts?
That needs to be done in addition to the V6 script when using ICS roms to get 100%.
Of course, non ICS roms get 100% supercharged with the script itself since there's no need to patch services.jar
zeppelinrox said:
erm... it CAN'T be more effective than supercharging... because it IS SuperCharging
Well, 50% of it. The other 50% comes from the script when on ICS.
Why do you think that website is integrated into the latest V6 Scripts?
That needs to be done in addition to the V6 script when using ICS roms to get 100%.
Of course, non ICS roms get 100% supercharged with the script itself since there's no need to patch services.jar
Click to expand...
Click to collapse
LOL. Did you search yourself? HAHA. Yes, we are talking about how awesome your scripts are..
I would be using them myself but I can't figure out a setting that really makes it awesome like it did with my old vibrant!
Edit: And thanks for the explanation, that makes more sense than whatever post that lead me to your patch.
what is a modified boot image?
what is the different between the modifed boot image and the android we can download from the developer google site/?
**Root access required**
Download:
- I545_OC1_Batch_DeBloater
- debloat.zip by @klabit87 for Linux & Mac Users
Instructions:
1. Extract the I545_OC1_Batch_DeBloater folder onto your desktop.
2. Turn on USB Debugging from Developer Options and connect your device to your *PC.
3. Double-click DeBloater.bat to launch the program.
4. Select "Light," "Medium," or "Extreme" **debloating and press Enter.
5. Grant Root Access if prompted by your device and press Enter to begin.
6. Once complete press Enter to return to the Main Menu and select ***Reboot Device.
7. Last, select Exit from the main menu to end your session. Done!
* Make certain that you have Samsung Drivers installed.
** Use notepad++ or other text editor to view/edit the lists of removed apps in DeBloater.bat file.
*** It is normal for apps to begin force closing prior to rebooting your device.
wanna point out that this is windows only, as i dont think there are any low-level samsung drivers for linux
and this is a batch file.
skepticmisfit said:
wanna point out that this is windows only, as i dont think there are any low-level samsung drivers for linux
and this is a batch file.
Click to expand...
Click to collapse
Correct, windows only.
worked great for me. using the extreme option (cuz 90s kid) left only s memo and s voice as far as any real bloatware. so much easier than using titanium backup and having to go through stuff. thanks for this, muniz
skepticmisfit said:
wanna point out that this is windows only, as i dont think there are any low-level samsung drivers for linux
and this is a batch file.
Click to expand...
Click to collapse
Just sent script to muniz_ri for approval for Linux and probably Mac users.
Tested adb functions and everything works on Ubuntu 14.04
Edit:
Just been given the go ahead by @muniz_ri
Here is the link for the linux version, as I said it may work for Mac
debloat.zip
As always you are more than welcome to add this to the op if you wish.
Muniz I ran the batch file and it worked great getting rid of all that bloat. Thank you very much. One thing that surprised me though is that I went from 5.15GB of used internal storage to 4.98GB after debloating and that's after running CCleaner to get rid of any left over junk. I was expecting to gain more memory space considering how many apps were removed. Is this normal? Thanks
Eddie Hicks said:
Muniz I ran the batch file and it worked great getting rid of all that bloat. Thank you very much. One thing that surprised me though is that I went from 5.15GB of used internal storage to 4.98GB after debloating and that's after running CCleaner to get rid of any left over junk. I was expecting to gain more memory space considering how many apps were removed. Is this normal? Thanks
Click to expand...
Click to collapse
there's three settings in the batch script. which one did you use?
also, the bloat apps aren't really that big, they're all near the 10-20mb or less ballpark. accumulating 20 of them up probably frees up like maybe 100-200 mb of space. this is of course wild speculation as I usually make but still, something to consider
skepticmisfit said:
there's three settings in the batch script. which one did you use?
also, the bloat apps aren't really that big, they're all near the 10-20mb or less ballpark. accumulating 20 of them up probably frees up like maybe 100-200 mb of space. this is of course wild speculation as I usually make but still, something to consider
Click to expand...
Click to collapse
Thanks for getting back. I used extreme setting. I guess the files are not as large as I thought. I may not have gained much memory space but at least the bloat is gone.
I gave adb root permissions through SuperSU, ran this (slightly customized extreme, I kept Hangouts), and verified that the folders have been removed. After doing that, many of the apps I still had to manually uninstall (is that normal?), and some I'm not sure if I even can remove some (I just have a disable option).
I know you guys know better than I, but is simply removing these directories from /system/app enough to uninstall the applications?
Thanks.
Hi @muniz_ri you are my guru in these topics what's your position in new update for SCH-I545 how can we update without loose detox and root and xposed thanks in advance
Sent from my SCH-I545 using XDA Free mobile app
EdrickMG said:
Hi @muniz_ri you are my guru in these topics what's your position in new update for SCH-I545 how can we update without loose detox and root and xposed thanks in advance
Sent from my SCH-I545 using XDA Free mobile app
Click to expand...
Click to collapse
Someone needs to capture the ota so that a pre-rooted ROM can be created.
this works on of1, using the same instructions.
it seems samsung gave up on Story Album because both story album related apps were apparently not present, according to the debloater tool. hooray for removed bloat!
muniz_ri said:
Someone needs to capture the ota so that a pre-rooted ROM can be created.
Click to expand...
Click to collapse
Hello,
I'm a programmer (in college, mostly C & C++), but my knowledge of android is limited to rooting my S4 and other stuff I've gleaned while lurking on xda.
A quick search for how to capture an ota seems that it's not terribly difficult to do. ex http://forum.xda-developers.com/showthread.php?t=1589754
Is my impression (capturing ota update is not hard) correct? If so, why hasn't it been done? If the answers to those questions are "Yes" and "No good reason," respectively, I might be able to donate some of my time to do it. Would that be useful?
jdelphiki99 said:
Hello,
I'm a programmer (in college, mostly C & C++), but my knowledge of android is limited to rooting my S4 and other stuff I've gleaned while lurking on xda.
A quick search for how to capture an ota seems that it's not terribly difficult to do. ex http://forum.xda-developers.com/showthread.php?t=1589754
Is my impression (capturing ota update is not hard) correct? If so, why hasn't it been done? If the answers to those questions are "Yes" and "No good reason," respectively, I might be able to donate some of my time to do it. Would that be useful?
Click to expand...
Click to collapse
Muniz already got the update and created instructions for OF1 here
Is there a list of what gets removed at each level?
rpmm70 said:
Is there a list of what gets removed at each level?
Click to expand...
Click to collapse
Open the .bat file and you can read it all to see.
adb is not a recognized command
when i tried this it says that adb is not a recognized command. running windows 10 is that why?
devtinagub said:
when i tried this it says that adb is not a recognized command. running windows 10 is that why?
Click to expand...
Click to collapse
You may have deleted adb.exe from the extracted folder (maybe you havent extracted all the files), you must have the 4 files included at zip:
adb.exe
AdbWinApi.dll
AdbWinUsbApi.dll
Debloater.bat
solved! thank you
Edgardo_Uchiha said:
You may have deleted adb.exe from the extracted folder (maybe you havent extracted all the files), you must have the 4 files included at zip:
adb.exe
AdbWinApi.dll
AdbWinUsbApi.dll
Debloater.bat
Click to expand...
Click to collapse
thank you so much i finally was able to root my phone last night! you are awesome!
it says "no such file or directory" for everything on my phone when I run it. Any ideas there?
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.. -_-
"Blobs" are the files specific to each device that we need in order to compile custom ROMS that work on our device. The process of finding them is tedious and slow... I have been picking away at them for months when I have time. There are over 600 files so far! But there are also references to files that are not being found. They are either missing, or they are not located where they are expected to be located. This is where I need help.
So, if you want to help, go HERE:
https://github.com/mightysween/android_vendor_motorola_payton
and look through the proprietary-files.txt file for anywhere that it says "warning".... and then search inside of the firmware (working on 8.0+ now, not 7.1 please) and try to track down the file that it says is missing [obviously, you will need a system dump, or to search on a rooted device]. If you find it, please post below like this:
LINE NUMBER OF THE WARNING (from github)
PATH TO THE MISSING FILE (relative to /system... in other words, don't inlude your own local path)
Once this file is complete, we can use it to automatically pull the correct vendor files into our build environments... having a working recovery, active kernel developement and completed vendor blobs should open us up to more development efforts.
Also, if anyone has done any testing and knows of other proproetary files that are needed, please post them here so I can include them.
My time at the computer to work on this is really limited, so I have only identified a dozen or so daemons that definitely call for proprietary libs... I am sure there are more
I would love to pitch in on this but have zero experience with anything related to development. Do you think I could still be of help? Sounds like a basic enough task that it wouldn't be too difficult. Let me check and see that I understand the process.
Went to github and looked at proprietary-files.txt. The first warning I found was in line 49: "blob file libpn553_fw.so missing or broken". Then searched for that file in my device's system folder using ES File Explorer with Root Explorer enabled.
So is this what you're looking for?
49
/system/vendor/firmware/libpn553_fw.so
---------- Post added at 14:31 ---------- Previous post was at 14:07 ----------
I'd like to contribute in some way but if this is best not left to a complete noob then I totally understand
mightysween said:
Also, if anyone has done any testing and knows of other proproetary files that are needed, please post them here so I can include them.
My time at the computer to work on this is really limited, so I have only identified a dozen or so daemons that definitely call for proprietary libs... I am sure there are more
Click to expand...
Click to collapse
Do you have a link to a system dump?
TheBassDude said:
I would love to pitch in on this but have zero experience with anything related to development. Do you think I could still be of help? Sounds like a basic enough task that it wouldn't be too difficult. Let me check and see that I understand the process.
Went to github and looked at proprietary-files.txt. The first warning I found was in line 49: "blob file libpn553_fw.so missing or broken". Then searched for that file in my device's system folder using ES File Explorer with Root Explorer enabled.
So is this what you're looking for?
49
/system/vendor/firmware/libpn553_fw.so
---------- Post added at 14:31 ---------- Previous post was at 14:07 ----------
I'd like to contribute in some way but if this is best not left to a complete noob then I totally understand
Click to expand...
Click to collapse
Thanks, that is all there is to it
Just time consuming (especially after the first 500)...lol
QWZR said:
Do you have a link to a system dump?
Click to expand...
Click to collapse
Nah, too big to conveniently upload... but if you are rooted, you can use the phone to search
mightysween said:
Nah, too big to conveniently upload... but if you are rooted, you can use the phone to search
Click to expand...
Click to collapse
Mine gets here next week
mightysween said:
Nah, too big to conveniently upload... but if you are rooted, you can use the phone to search
Click to expand...
Click to collapse
If you have root on the system you can find the files for, you should be able to find any given filename with:
find / -name "filename" -print
And it should output any filenames that match. I don't have time at the moment to dig into this any more, but would this resolve much of it?
ebrandsberg said:
If you have root on the system you can find the files for, you should be able to find any given filename with:
find / -name "filename" -print
And it should output any filenames that match. I don't have time at the moment to dig into this any more, but would this resolve much of it?
Click to expand...
Click to collapse
Any way that works is fine by me
I am on the road a lot and just don't have enough time to sit and work on it... so it is taking months. I bet a few people helping could finish it in a matter of hours.
I am hoping to have a few hours next week to work on it. But the sooner this is done, the sooner I can shift to trying to compile Lineage OS with working hardware.
BTW, Lineage *does* compile if I comment out all the stuff causing make errors... not much works, obviously.
The next step will be compiling with these blobs, then logging all the new errors and chasing down all the additional broken symlinks... and then adapting the kernel as needed.
Then, MAYBE we can get a base Lineage tree up and open up the X4 to building for other roms. I know someone started a skeleton tree for Carbon already on Github... they are likely just waiting for the completed device tree, too.
mightysween said:
Thanks, that is all there is to it
Just time consuming (especially after the first 500)...lol
Click to expand...
Click to collapse
ebrandsberg said:
If you have root on the system you can find the files for, you should be able to find any given filename with:
find / -name "filename" -print
And it should output any filenames that match. I don't have time at the moment to dig into this any more, but would this resolve much of it?
Click to expand...
Click to collapse
I don't own this device yet, but I was thinking of getting one. I figured this might help you all out (you'll need to be running linux):
First, let's get a list of all the files on the phone, to make searching faster.
Code:
adb shell
su
find / > /sdcard/allfiles.txt
exit
exit
adb pull /sdcard/allfiles.txt
Now you should have allfiles.txt on your machine. Also grab the proprietary-files.txt, and then run this:
Code:
grep -Po '(?<=(blob file )).*(?= missing or broken)' proprietary-files.txt | xargs -I @ grep "@" allfiles.txt
That should find the paths of all the missing files (except the ones marked "wildcard")
BLuFeNiX said:
I don't own this device yet, but I was thinking of getting one. I figured this might help you all out (you'll need to be running linux):
First, let's get a list of all the files on the phone, to make searching faster.
Code:
adb shell
su
find / > /sdcard/allfiles.txt
exit
exit
adb pull /sdcard/allfiles.txt
Now you should have allfiles.txt on your machine. Also grab the proprietary-files.txt, and then run this:
Code:
grep -Po '(?<=(blob file )).*(?= missing or broken)' proprietary-files.txt | xargs -I @ grep "@" allfiles.txt
That should find the paths of all the missing files (except the ones marked "wildcard")
Click to expand...
Click to collapse
Thanks, I had recently completed this, but your code worked fantastic for double checking, and actually helped me find one that I had missed :good:
Now, on to identifying any more daemons that need proprietary files... and then assembling the tree itself... PROGRESS!
PHASE 1 is complete!
https://github.com/mightysween/android_vendor_motorola_payton
I am 99% sure that this is only ~75% of what will be needed to actually build LOS15. But it is a good foundation to work off of now.
My plan is to start attempting to compile LOS and take error logs to chase down the remaning missing stuff. LOTS to be done still to get to that point...hoping for some other builders/devs to materialize here and help out
Hi! Just a question: it´s mandatory to use A/B partition scheme to build a custom ROM for this device or it will be possible to use a traditional partition scheme and free up some GBs of internal storage for use?
christianrj said:
Hi! Just a question: it´s mandatory to use A/B partition scheme to build a custom ROM for this device or it will be possible to use a traditional partition scheme and free up some GBs of internal storage for use?
Click to expand...
Click to collapse
It would seem that we will still be stuck with A/B, as the bootloader does the initial check of the active slot. Perhaps there may be some clever ways around this in the future...but nothing I will be tackling.
mightysween said:
It would seem that we will still be stuck with A/B, as the bootloader does the initial check of the active slot. Perhaps there may be some clever ways around this in the future...but nothing I will be tackling.
Click to expand...
Click to collapse
You would probably need a custom kernel to do it properly. The bootloader passes a kernel param (androidboot.ro.boot.slot_suffix) specifying which slot to use. In the absense of a kernel param, the value is read from the ro.boot.slot_suffix build property.
That being said, you might be able to just repartition your device to only have 1 slot, flash your ROM, and use
Code:
fastboot --set-active=_a
. If your ROM has disabled OTA updates from the OEM, you should be fine.
I'm going to get an X4 in the coming weeks. I'd like to help with this soon. I'm a seasoned developer by trade and can collab on GitHub. Hope to be able to start working with you soon. :good:
I don't know if any of you have seen this article, but it seems promising that it might not be too difficult to achieve for this device:
https://www.xda-developers.com/xiaomi-redmi-note-4-project-treble/
Hariiiii said:
I don't know if any of you have seen this article, but it seems promising that it might not be too difficult to achieve for this device:
https://www.xda-developers.com/xiaomi-redmi-note-4-project-treble/
Click to expand...
Click to collapse
@vache at the Moto G5 Plus forums has already managed it using the /oem partition which is otherwise unused for custom ROMs
Hariiiii said:
I don't know if any of you have seen this article, but it seems promising that it might not be too difficult to achieve for this device:
https://www.xda-developers.com/xiaomi-redmi-note-4-project-treble/
Click to expand...
Click to collapse
Cool... seems it may be possible. Will follow the progress on the Redmi and G5 devices
navenedrob said:
I'm going to get an X4 in the coming weeks. I'd like to help with this soon. I'm a seasoned developer by trade and can collab on GitHub. Hope to be able to start working with you soon. :good:
Click to expand...
Click to collapse
The more I am reading about enabling Treble, the more I think it is entirely possible.... and probably the best direction to focus our efforts.
Seems like we have partitions that could be used as /vendor. I am reading up on exactly how the Treble vendor partition is set up. Tricky, but not implausible.
EDIT: Actually, none of the partitions we could potentially re-purpose for /vendor are big enough. So, it may be harder on this device than on others. It may require repartitioning.
HP TOUCHPAD has discovered a wonderful way to speed up the old girl, but for many it's too complicated. So here's an easy way.
Download the SKZ Kernel from here
Download Swapper from the Playstore
This creates a swapfile rather than a swap partition. There's plenty of discussion about the relative merits of each, but for normal operations, they're pretty much equivalent.
You'll need to be rooted, of course, and your ROM needs to be Dirty Unicorns. Set the swap for what you want (I used 384 MB, but you'll never need more than 1 GB). The kernel contains most of HP TOUCHPAD's changes, but I've not disabled anything in the kernel, so you can still set it any way you want.
Enjoy, and be sure and thank HP TOUCHPAD for his great work.
...
friends, I do not know how to do this, a step by step video, please refer to the step when creating the kernel installation zip file, which the user will install using TWRP.
Add a script to create the swap file and format, a video with this step please
HP_TOUCHPAD said:
__SNIP__
Add an script to create the swap file and formatted:
Working directory:
Code:
cd /boot/usr/sbin
./lvm.static vgchange -ay
./lvm.static lvcreate -l 100%FREE -C y -M y --major 254 --minor 0 -n /dev/store/swap
mkswap /dev/store/swap
__SNIP__]
Click to expand...
Click to collapse
Ok, you win. Check out my latest kernel here
...
..
HP_TOUCHPAD said:
--SNIP--
The issue it by setting the permission (set_perm), something is wrong.
Click to expand...
Click to collapse
Try this
..
HP_TOUCHPAD said:
--SNIP
Also the process of update is been done by update-binary and not busybox. The update-binary that you have is 832.7 kb the one on the Dirty Unicorn ROM zip file is 1.3 MB. I also swap the update-binary but it did not work.
I think that the reason set_perm does not work is because is not integrated in the update-binary which has all the commands to execute the update-script.
Where does the update-binary comes from? where is it generated from?
--SNIP--
Click to expand...
Click to collapse
Version with an old update-binary here. I tested it in recovery, and it seems to work, but I'm not holding my breath.
...
HP_TOUCHPAD said:
Is a good thing you did not hold your breath, other wise your skin color will be like a Smurf and not able to read this message, as you will be on the other side ;-(.
The update-binary been only 254.7 kb, is able to change the permission and also run a program and that is all we need it to do. But because the environment is not properly set in TWRP the common arguments does not work and everything must be specified. The run_program ("lvm.sh") does not work as I explained why.
Just when I thought that I knew the basics, now I am learning how Edify Code works and that is the fundamental as is the (creation), (installation) or (flashing) of everything that gets copy and executed in Recovery.
I got it working!
But I am writing everything in details to wipe out all the partitions ( a reset ) and then recreating everything including the swap partition, it should work for all models 16GB 32GB and 64GB. One single zip flash!
Will report back with the results!
Click to expand...
Click to collapse
Good luck. I'm done. I did notice, however, that you can replace the update-binary with your own shell script, but that was more than I wanted to do.
...
help!
Halloo
I'm trying to do this as my touchpad is unusably laggy using DU. I can't get it rooted though... Can someone explain the latest method? I tried various SuperSU zips, nothing works. I suspect I'm doing something wrong..
...
Thats good news! Meanwhile could you help me with the SuperSU problem?? I want to get rooted!!
...
HP_TOUCHPAD said:
--SNIP--
The swap file is not been use by the Kernel.
( keep it lean )
--SNIP--.
Click to expand...
Click to collapse
The swap file is not in use because there isn't any command to turn it on. You need to add "swapon /dev/store/swap" to the script or in the ramdisk after boot initialization.
This is where we part company. I've always wanted to provide the greatest flexibility, not the necessarily the best performance. I'm not really interested in providing the single "best" configuration since I don't know what others think is the "best". You're doing a great job - go for it. I'm outta here.
..
This is sounding good! Hope you guys are successful!
...