Related
Memory Tweak - get more free RAM to use for apps and less lag.
// This was first intended for other ROM chefs, so they can include this tweak in their ROMs. I'm aware that there are apps which can do this. But it's the idea to have it included automatically, so you don't have to annoy your users
However, this is also for normal users. Those just flash the CWM Package thunderteaser made here. Thanks for this.
I made a script which boosts the RAM Management significantly.
You can use this in any ROM - those values have been created from my mind and were being tested for several days in heavy use.
IMHO, it's the perfect combination of RAM Management.
HOW TO IMPLEMENT IT INTO YOUR ROM
Just make a new bash script and place the following code into it.
NOTE: bash files created on Windows don't work. Create them with a UNIX like Linux (Ubuntu, Fedora, whatever) or Mac OS X.
Place the script in /system/etc/init.d so it gets automatically executed at every startup. You have to make this because init.rc (in root dir /) gets executed first and will also set the RAM Management (minfree) on his own.
UPDATE - 20.03.2011
Supercurio said, there is support for init.d in his Voodoo injected kernel for JV1 Gingerbread.
This means, the script is fully working and the Gingerbread JV1 memory leaks are fixed when using those values.
This also means, my current ROM v10.0 Beta 3 already has the Memory Hack integrated.
Code:
#!/system/bin/sh
# DarkyROM 2011 - Joël Staub (darkyy)
# This will stabilize the memory leaks in Gingerbread and other ROMs.
# Adjusting Memory Settings
# The values in MB: 10, 16, 24, 68, 76, 92
if [ -e /sys/module/lowmemorykiller/parameters/minfree ]; then
echo "Modifying minfree parameters"
echo "2560,4096,6144,17408,19456,23552" > /sys/module/lowmemorykiller/parameters/minfree
else
echo "minfree not found"
fi
Permissions
You may want to adjust the permissions of the script when it's on your phone.
You can do it with ADB.
First, connect to your phone.
Code:
adb shell
Get root access.
Code:
su
Set the permissions.
Code:
chmod 777 /system/etc/init.d/ramtweak
Code:
chown root:root /system/etc/init.d/ramtweak
When you're a ROM chef, you can include those permissions either with update(r)-script or with a bash file.
Thanks to zacharias.maladroit for the hint with the permissions.
- darkyy.
Darkyy said:
Ignore the # You're not allowed to use this script without giving proper credits. - EVERYONE IS WELCOME TO IMPLEMENT THIS INTO HIS / HER ROM - I don't need credits.
Click to expand...
Click to collapse
If you don't mean it, take it out
Ok this looks awesome but for the most part of the members can u make a proper tutorial ? I really don't understand how to implement your hack, how to create a bash script init.d ?
sorry for my noobiness
And when you say in every ROM, did you also mean every custom kernel ?
chambo622 said:
If you don't mean it, take it out
Click to expand...
Click to collapse
I will, sorry for this crap
I'm a bit too tired...
touness69 said:
Ok this looks awesome but for the most part of the members can u make a proper tutorial ? I really don't understand how to implement your hack, how to create a bash script init.d ?
sorry for my noobiness
And when you say in every ROM, did you also mean every custom kernel ?
Click to expand...
Click to collapse
You just make a new file on your COMPUTER.
Or it would even work on your SGS (but I'm writing now for the Computer).
Example:
Let's say, you're on Windows - create a NEW text file and remove the .txt extension (you need to have this option activated in the explorer settings).
You can leave it to no extension or just make it end on .sh
You got a file called randomname.sh now.
Now to make it easy, just copy this file to the C: drive in NO subfolder.
Now just ADB push this file to your SGS into:
Code:
adb push /randomname.sh /system/etc/init.d
Or just copy the .sh file to your SGS via USB Storage mount and copy it to the directory with Root Explorer or Super Manager.
Yes, this should work with every kernel (Android 2.2.1) here.
Thanks for doing this testing to find good settings. Forgive me if I'm misinformed, but is there anything particularly innovative about new minfree settings? I do appreciate your testing and finding ones that work well for you.
have a good rest, Darkyy !
thanks for this script
so you noticed improved interactivity with "apps and less lag" ?
gotta try this with CM7
FYI:
the defaults of the CM7 kernel are:
Code:
cat /sys/module/lowmemorykiller/parameters/minfree
2048,3072,4096,6144,7168,8192
edit2:
make sure that you get the right permissions for the file on the phone afterwards
say:
Code:
chmod 750 /system/etc/init.d/99rambooster
chown root:shell /system/etc/init.d/99rambooster
thanks for explanation ! I have done what you say and rebooted my phone after that. I renamed the file to init.d after placing it into the /system/etc/ directory and setted the défault permissions for this file rwxrwxrwx (or something like that)
But how I find if I have the hack succesfuly installed ?
chambo622 said:
Thanks for doing this testing to find good settings. Forgive me if I'm misinformed, but is there anything particularly innovative about new minfree settings? I do appreciate your testing and finding ones that work well for you.
Click to expand...
Click to collapse
Not innovative - this is nothing new.
It's just that many ROM devs aren't aware of this and I thought I could share my script.
zacharias.maladroit said:
have a good rest, Darkyy !
thanks for this script
so you noticed improved interactivity with "apps and less lag" ?
gotta try this with CM7
FYI:
the defaults of the CM7 kernel are:
Code:
cat /sys/module/lowmemorykiller/parameters/minfree
2048,3072,4096,6144,7168,8192
edit2:
make sure that you get the right permissions for the file on the phone afterwards
say:
Code:
chmod 750 /system/etc/init.d/99rambooster
chown root:shell /system/etc/init.d/99rambooster
Click to expand...
Click to collapse
Strange permissions...
This would be rwx r-x --- [Owner, Group, Other]
EDIT:
Ouch, CM7 really has 2048,3072,4096,6144,7168,8192?
That's really not the best value... looks close like JV1 RAM Management at first glance...
I'm gonna check that later.
Darkyy said:
Not innovative - this is nothing new.
It's just that many ROM devs aren't aware of this and I thought I could share my script.
Strange permissions...
This would be rwx r-x --- [Owner, Group, Other]
EDIT:
Ouch, CM7 really has 2048,3072,4096,6144,7168,8192?
That's really not the best value... looks close like JV1 RAM Management at first glance...
I'm gonna check that later.
Click to expand...
Click to collapse
yes,
and those are really the permissions
ls -l
-rwxr-x--- 1 root shell 365 Aug 1 2008 00banner
-rwxr-x--- 1 root shell 27 Aug 1 2008 01sysctl
-rwxr-x--- 1 root shell 229 Aug 1 2008 03firstboot
-rwxr-x--- 1 root shell 201 Aug 1 2008 04modules
-rwxr-x--- 1 root shell 1452 Aug 1 2008 05mountsd
-rwxr-x--- 1 root shell 272 Aug 1 2008 06mountdl
-rwxr-x--- 1 root shell 925 Aug 1 2008 20userinit
-rwxr-x--- 1 root shell 2533 Mar 19 02:20 89system_tweak
-rwxr-x--- 1 root shell 2848 Aug 1 2008 90screenstate_scaling
Click to expand...
Click to collapse
good thing you came up with these improved values,
I'm gonna include these in the next revision of my script / kernel
thanks again
Thanks Darkyy! Once again, you kicketh ass!
I am gonna give this a try.
Nice, some info on min free settings:
http://www.androidcentral.com/fine-tuning-minfree-settings-improving-androids-multi-tasking
while we're at it:
you could include lots of stuff from the
tweak script for the Galaxy Spica
in your next revision of ROM
I'm using some of those
and planning to continually add more after having tested them
DocRambone said:
Nice, some info on min free settings:
http://www.androidcentral.com/fine-tuning-minfree-settings-improving-androids-multi-tasking
Click to expand...
Click to collapse
Thanks Doc, will add it tomorrow in the OP.
zacharias.maladroit said:
while we're at it:
you could include lots of stuff from the
tweak script for the Galaxy Spica
in your next revision of ROM
I'm using some of those
and planning to continually add more after having tested them
Click to expand...
Click to collapse
Nice, but most things are specially for the low-end device Spica.
I'll sure look into it
Thank you
Gah this is such a retarded suggestion. Darky your SGS ROM is really nice and I'm currently running it, but please think about things like this before you post them.
The SGS has, comparatively, RAM out the wazoo. Why do we want more of it sitting idle and unused? RAM is there to be used, not sit there looking unused and pretty like a virgin at an eastern european slave auction in a free -m command. Twatting about with this setting on behalf of the Android Low Memory Killer is essentially like telling the ROM you have less RAM than you actually do since it will always endeavour to keep that much RAM -free- as in -unused- by the GUI itself as well as Android apps.
Darkyy said:
Memory Tweak - get more free RAM to use for apps and less lag.
I made a script which boosts the RAM Management significantly.
You can use this in any ROM - those values have been created from my mind and were being tested for several days in heavy use.
IMHO, it's the perfect combination of RAM Management.
HOW TO IMPLEMENT IT INTO YOUR ROM
Just make a new bash script and place the following code into it.
Place the script in /system/etc/init.d so it gets automatically executed at every startup. You have to make this because init.rc (in root dir /) gets executed first and will also set the RAM Management (minfree) on his own.
This doesn't work on JV1 now because we don't have the kernel sources to implement init.d support.
Code:
#!/system/bin/sh
# DarkyROM 2011 - Joël Staub (darkyy)
# This will stabilize the memory leaks in Gingerbread and other ROMs.
# Adjusting Memory Settings
# Old Hack (you can ignore this, it's just another method of doing it)
#if [ -e /sdcard/darky_tweak/init.rc ]; then
# echo "Copying init.rc to /"
# cp /sdcard/darky_tweak/init.rc /
# else
# echo "No init.rc found"
#fi
# New Method [15.03.2011]
if [ -e /sys/module/lowmemorykiller/parameters/minfree ]; then
echo "Modifying minfree parameters"
echo "2560,4096,6144,17408,19456,23552" > /sys/module/lowmemorykiller/parameters/minfree
else
echo "minfree not found"
fi
- darkyy.
Click to expand...
Click to collapse
How to do it. any video to show us. ??
touness69 said:
thanks for explanation ! I have done what you say and rebooted my phone after that. I renamed the file to init.d after placing it into the /system/etc/ directory and setted the défault permissions for this file rwxrwxrwx (or something like that)
But how I find if I have the hack succesfuly installed ?
Click to expand...
Click to collapse
He said to place it inside init.d not call it init.d. Are you honestly this illiterate?
shaldi said:
How to do it. any video to show us. ??
Click to expand...
Click to collapse
How to create a text file and place it where he says to place it? Are you honestly this illiterate?
Darkyy said:
You just make a new file on your COMPUTER.
Or it would even work on your SGS (but I'm writing now for the Computer).
Example:
Let's say, you're on Windows - create a NEW text file and remove the .txt extension (you need to have this option activated in the explorer settings).
You can leave it to no extension or just make it end on .sh
You got a file called randomname.sh now.
Now to make it easy, just copy this file to the C: drive in NO subfolder.
Now just ADB push this file to your SGS into:
Code:
adb push /randomname.sh /system/etc/init.d
Or just copy the .sh file to your SGS via USB Storage mount and copy it to the directory with Root Explorer or Super Manager.
Yes, this should work with every kernel (Android 2.2.1) here.
Click to expand...
Click to collapse
Darkyy, so I just copy the codes, paste in notepad then save as [anygivenname.sh] then paste into system/ect/init.d using root explorer and reboot my galaxy s?
Darky is this included in your rom? if not is it going to be?
bernard134 said:
Darkyy, so I just copy the codes, paste in notepad then save as [anygivenname.sh] then paste into system/ect/init.d using root explorer and reboot my galaxy s?
Click to expand...
Click to collapse
guys
seriously: read what comes after the 1st ,2nd and 3rd post - or the first 1-3 (or 5 sites) if it's a larger topic
you'll see that you need to change the permissions & owner
you do that via logging in via adb, becoming root (su)
and navigating to /system/etc/init.d/
or do it explicitly from the folder where you are - like I posted
0) prepare file on windows / linux / mac
Code:
#!/system/bin/sh
# DarkyROM 2011 - Joël Staub (darkyy)
# This will stabilize the memory leaks in Gingerbread and other ROMs.
# Adjusting Memory Settings
# Old Hack (you can ignore this, it's just another method of doing it)
#if [ -e /sdcard/darky_tweak/init.rc ]; then
# echo "Copying init.rc to /"
# cp /sdcard/darky_tweak/init.rc /
# else
# echo "No init.rc found"
#fi
# New Method [15.03.2011]
if [ -e /sys/module/lowmemorykiller/parameters/minfree ]; then
echo "Modifying minfree parameters"
echo "2560,4096,6144,17408,19456,23552" > /sys/module/lowmemorykiller/parameters/minfree
else
echo "minfree not found"
fi
e.g. save as:
99rambooster
1) dl & install Android SDK
http://www.talkandroid.com/android-sdk-install-guide/
2) connect phone
navigate to tools folder (or from Linux: launch from terminal via command)
3) put it on the phone
Code:
adb push 99rambooster /sdcard/
4) log in to phone & become root
Code:
adb shell
(now in phone)
Code:
su
5) copy it to init.d folder [you eventually need to remount /system rw]
Code:
cp /sdcard/99rambooster /system/etc/init.d/
6) adjust permissions:
Code:
chmod 750 /system/etc/init.d/99rambooster
chown root:shell /system/etc/init.d/99rambooster
Hi guys i have a problem creating the bootmenu
I am following this post but when i'm going to 3rd line:
C:/> adb shell
$ su
# cp -R /sdcard/bootmenu /data/bootmenu
# cd /data/bootmenu
# chmod 755 *
# ./install.sh
# rm -R /data/bootmenu
i get the following message: cd: can't cd to /data/bootmenu
could you tell me please what i'm doing wrong???
Post the output of
# ls -l /data/bootmenu
Maybe it does not exist OR it is a file (it will be a file if /sdcard/bootmenu was one)
But in any case: It's much easier to install 2nd-init directly from the android market: The currently included version 0.45 works good enough to install the CM7 port (afterwards you'll have 0.51 anyway as the port includes it's own version)
pabx said:
Post the output of
# ls -l /data/bootmenu
Maybe it does not exist OR it is a file (it will be a file if /sdcard/bootmenu was one)
But in any case: It's much easier to install 2nd-init directly from the android market: The currently included version 0.45 works good enough to install the CM7 port (afterwards you'll have 0.51 anyway as the port includes it's own version)
Click to expand...
Click to collapse
Ok thanks! I saw today new version of this that include 0.5.1
Hi !
Stock Asus Kernel 10.4.2.17 & 10.4.2.16 - build from the last update Asus source code !
Because Asus has not yet released the new firmware 10.4.2.16, propose to see together, which brings new kernel 10.4.2.16 !
Useful for all those who want to see what improvements brought on kernel Asus & also recommended for those who opt for the basic root version !
This kernel has init.d* support, root support | insecure kernel with "USB debugging" already enabled !
Change log :
unfortunately not found ( Asus not released yet ! )
Downloads :
kernel_10.4.2.16.zip
boot.blob_10.4.2.17.zip - 5.33 MB
cifs_md4_10.4.2.17.zip - 131.65 KB
Installation : 10.4.2.16
recommended to install just over latest firmware 10.4.2.13 ;
copy kernel_10.4.2.16.zip on your device and go to TWRP recovery ;
wipe cache & dalvik-cache -> Install ! ;
Now you have the last Android Asus firmware 10.4.2.13 with the last Asus kernel 10.4.2.16 !
Installation : 10.4.2.17
extract boot.blob from archive boot.blob_10.4.2.17.zip
put your device in fastboot mode
> fastboot -i 0x0B05 flash boot boot.blob
> fastboot -i 0x0B05 reboot
unzip archive cifs_md4_10.4.2.17.zip and extract cifs.ko & md4.ko
> adb shell
# mount -o remount,rw -t ext4 /dev/block/mmcblk0p1 /system
(...or if you have busybox already installed : # busybox mount -o remount,rw /system )
# exit
> adb push cifs.ko /system/lib/modules
> adb push md4.ko /system/lib/modules
> adb shell
# chown 0.0 /system/lib/modules/*
# chmod 0644 /system/lib/modules/*
# insmod /system/lib/modules/cifs.ko
# insmod /system/lib/modules/md4.ko
# exit
* available for any rom ( custom rom ) who already has busybox installed !
regard,
Surdu Petru
I have to say I'm pretty impressed, seems as smooth at 1300 as it did before on a modified .13 kernel at 1700 mhz! Thank you!
Sent from my ASUS Transformer Pad TF300T using Tapatalk 2
Do you plan on adding oc an your I/o tweaks to this Cus that would be awesome
Sent from my SAMSUNG-SGH-I727 using xda app-developers app
here is the diff from 10.4.2.13->10.4.2.16 the kernel was released for the JP sku, possibly adding support for an audio dock of some sort.
https://github.com/untermensch/asus_kernels/commit/a377c8f41d6d99aa102ecfc976e4049c80b7ec6a
Charle692 said:
Do you plan on adding oc an your I/o tweaks to this Cus that would be awesome
Sent from my SAMSUNG-SGH-I727 using xda app-developers app
Click to expand...
Click to collapse
Yes, sure ...
untermensch said:
here is the diff from 10.4.2.13->10.4.2.16 the kernel was released for the JP sku, possibly adding support for an audio dock of some sort.
https://github.com/untermensch/asus_kernels/commit/a377c8f41d6d99aa102ecfc976e4049c80b7ec6a
Click to expand...
Click to collapse
Thank you untermensch ! :good:
After deciding to keep my tf300 until i see the nexus 10 in person at least. Im now running stock rooted and this kernel.
Wow this is super smooth its a joy to use this tablet now... Thanks!
Although i like to OC my devices im now starting to appreciate longer battery life more..
Sent from my GT-N7000 using xda app-developers app
Quick question: did anyone notice I/O boost after flashing this kernel (e.g in quadrant)?
Hi !
Update !
Build from Asus kernel source code ( last update 10.4.2.17 14/11/2012 ) => modules cifs, md4 & kernel !
...please check my first post ! :good:
Hi !
Cifs & md4 module for the last update Asus TF300T Firmware 10.4.2.17 !
Download :
cifs_md4_10.4.2.17.zip - 131.65 KB
Installation :
unzip archive and extract cifs.ko & md4.ko
conect USB cable
> adb shell
# mount -o remount,rw -t ext4 /dev/block/mmcblk0p1 /system
(...or if you have busybox already installed : # busybox mount -o remount,rw /system )
# exit
> adb push cifs.ko /system/lib/modules
> adb push md4.ko /system/lib/modules
> adb shell
# chown 0.0 /system/lib/modules/*
# chmod 0644 /system/lib/modules/*
# insmod /system/lib/modules/cifs.ko
# insmod /system/lib/modules/md4.ko
# exit
Good luck ! :good:
regards,
Surdu Petru
surdu_petru said:
Hi !
Cifs & md4 module for the last update Asus TF300T Firmware 10.4.2.17 !
Download :
cifs_md4_10.4.2.17.zip - 131.65 KB
Installation :
unzip archive and extract cifs.ko & md4.ko
conect USB cable
> adb shell
# mount -o remount,rw -t ext4 /dev/block/mmcblk0p1 /system
(...or if you have busybox already installed : # busybox mount -o remount,rw /system )
# exit
> adb push cifs.ko /system/lib/modules
> adb push md4.ko /system/lib/modules
> adb shell
# chown 0.0 /system/lib/modules/*
# chmod 0644 /system/lib/modules/*
# insmod /system/lib/modules/cifs.ko
# insmod /system/lib/modules/md4.ko
# exit
Good luck ! :good:
regards,
Surdu Petru
Click to expand...
Click to collapse
Surdu Petru,
Thanks for compiling those modules, maybe not the best place to ask, but I'm just currious
if you had any issues with the 10.4.2.17 source code from ASUS, I wish I knew what I was doing wrong
but I had noticed the source was about 25% smaller than previous source I had downloaded from ASUS
KAD79 said:
Surdu Petru,
Thanks for compiling those modules, maybe not the best place to ask, but I'm just currious
if you had any issues with the 10.4.2.17 source code from ASUS, I wish I knew what I was doing wrong
but I had noticed the source was about 25% smaller than previous source I had downloaded from ASUS
Click to expand...
Click to collapse
Hi !
... the currently download has ~197.87MB and include kernel source ~452.2MB and mydroid ~414.2MB ( you can build here wireless driver ! )
... the previous source for firmware 10.4.2.17 was incomplete ! :good:
Flashable?
Please can u make a flasable zip of 10.4.2.17 so i can install it via TWRP cause i cant make it with fastboot method.
pankobios said:
Please can u make a flasable zip of 10.4.2.17 so i can install it via TWRP cause i cant make it with fastboot method.
Click to expand...
Click to collapse
Hi !
...please use Firmware 10.4.2.18 , is up to date ! :good:
Here are a few tricks that work with stock ROM and some apps I use. Maybe you find something you like to use too.
Little note on text here, sometimes you see " " (spaces) appear in text/code. They shouldn't be there. You will know when you see them. Ignore!
A very quick summary.
What type of values can you find/change in Android?
0) Linux sysclt values, use sysctl -a to list them (stored in /proc/sys/...)
1) Android properties, use getprop en setprop, you find them in /etc/build.prop
2) Android Settings databases, use settings list [system][global][secure] etc
3) Samsung CSC values, specific for Samsung to hide or show extra GUI elements in /system/csc/feature.xml or /etc/feauture_default.xml
4) Samsung Floating features, like above in /etc/floating_feature.xml
How to find them (1+3)?
- root your phone (install busybox on Android 4 or less)
- goto adb shell and su
- find /system -type f -exec strings -f {} \; | grep "persist\."
if you are looking for perstist. variables. Or to find CSC values use "CscFeature_"
Caveats: some "persist." values are stored in /data/property folder. Keep that in mind.
For some you need to change /system/build.prop, some are Samsung CSC features with the /system/csc/feauture.xml file or Android system settings db.
For some I cannot remember if it was already visible without tweaks. Anyway lets go
I put feature.xml (with a lot of nonworking csc features too!!!), build.prop and disabled_services.txt in attachement.
Reboot after putting new feature.xml in /system/csc folder. Permissions of the file: root.root 644, same for build.prop
If your Samsung ROM has no csc feature create /system/csc and put content in other.xml instead of feature.xml
Call Recording: <CscFeature_VoiceCall_ConfigRecording>RecordingAllowed</CscFeature_VoiceCall_ConfigRecording>
Call blocking: <CscFeature_Setting_EnableMenuBlockCallMsg>TRUE</CscFeature_Setting_EnableMenuBlockCallMsg>
Voice Recorder Quality: <CscFeature_VoiceRecorder_SupportRecordingQualitySetting>TRUE</CscFeature_VoiceRecorder_SupportRecordingQualitySetting>
Camera Shutter Sound:
build.prop ro.camera.sound.forced=0
<CscFeature_Camera_ShutterSoundMenu>TRUE</CscFeature_Camera_ShutterSoundMenu>
Data Usage on Quickpanel: <CscFeature_SystemUI_SupportDataUsageViewOnQuickPanel>TRUE</CscFeature_SystemUI_SupportDataUsageViewOnQuickPanel>
Multi Window: (sort of working, use recent apps button to see effect, landscape and portrait)
build.prop persist.sys.debug.multi_window=1 or setprop persist.sys.debug.multi_window 1
<CscFeature_Framework_ConfigMultiWindowTrayBarFunction>TRUE</CscFeature_Framework_ConfigMultiWindowTrayBarFunction>
Smart Manager:
<CscFeature_SmartManager_ConfigDashboard>dual_dashboard</CscFeature_SmartManager_ConfigDashboard>
<CscFeature_SmartManager_ConfigSubFeatures>autoclean|trafficmanager|trafficmanager_auto|storageclean|devicesecurity|autolaunch|cstyle|powerplanning</CscFeature_SmartManager_ConfigSubFeatures>
<CscFeature_SmartManager_DisableAntiMalware>TRUE</CscFeature_SmartManager_DisableAntiMalware>
ps: don't use "backgroundapp", it will FC RAM Management button
FM Radio Hybrid mode (inet) and EPG
Add support for Auto Follow and inet Hybryd support. Edit /etc/floating_feature.xml
<SEC_FLOATING_FEATURE_FMRADIO_REMOVE_AF_MENU>FALSE</SEC_FLOATING_FEATURE_FMRADIO_REMOVE_AF_MENU><SEC_FLOATING_FEATURE_FMRADIO_SUPPORT_HYBRID_RADIO>TRUE</SEC_FLOATING_FEATURE_FMRADIO_SUPPORT_HYBRID_RADIO>
<SEC_FLOATING_FEATURE_FMRADIO_SUPPORT_RDS>TRUE</SEC_FLOATING_FEATURE_FMRADIO_SUPPORT_RDS>
Smooth scroll of surface flinger
In /etc/floating_feature.xml
<SEC_FLOATING_FEATURE_FRAMEWORK_SUPPORT_SMOOTH_SCROLL>TRUE</SEC_FLOATING_FEATURE_FRAMEWORK_SUPPORT_SMOOTH_SCROLL>
Google installer overlay permission fix
For annoying overlay warning if using Lux for example (only for 6.0.1): here on xda
Apps that I use:
Xperia Keyboard: https://forum.xda-developers.com/android/apps-games/app-sony-xperia-keyboard-phones-t3346736
ZenUI Weather: http://www.apkmirror.com/apk/zenui-asus-computer-inc/
Samsung Apps: https://www.sammobile.com/apk/
Next Camera: https://forum.xda-developers.com/oneplus-one/themes-apps/app-cameranext-gallery-cm13-t3305917/page12
See attachement for comparisson Stock, Next and OpenCam.
Dalvik JIT for dex: build.prop: [size=+2]debug.usejit=true[/size]
adb commands: stop cd /data/dal*/arm rm * sync reboot
RIL wakelock optimalisation: build.prop: [size=+2]ro.ril.wake_lock_timeout=10000[/size]
Edit Quick Menu:
settings put secure sysui_qs_tiles "Wifi,Location,SilentMode,Flashlight,Bluetooth,MobileData,PowerSaving,UltraPowerSaving,RotationLock,AirplaneMode,DormantMode,WifiHotspot,Nfc,Sync,SFinder"
Tried to add SmartStay,MultiWindow,PersonalMode,AllShareCast but no tiles in Framework res.
I disabled a lot of bloatware using the pm disable command (too much for you I guess). Also in attachment.
Some hidden Activities you can find with QuickShortcutMaker (playstore):
- GPS Satellites (search for gps)
- SoundAlive Equalizer (search for alive) EDIT: not working for other than gmusic. SA will bypass for others. Need edit in SoundAlive apk.
Cheers
EDIT 19-01-2016: Added stock Camera from J7 which produces better quality picture.
Code:
- download SamsungCamera4_ESS_J7.apk
- adb push SamsungCamera4_ESS_J7.apk /sdcard/
- adb shell
- su
- mount -o remount,rw /system
- cd /system/priv-app/SamsungCamera4_ESS
- mv SamsungCamera4_ESS.apk SamsungCamera4_ESS.apk.J5
- mv oat oat.J5
- cp /sdcard/SamsungCamera4_ESS_J7.apk .
- chmod 644 SamsungCamera4_ESS_J7.apk
- stop
- sync
- reboot
After reboot start camera and clear settings first! Then do camera settings.
Remove Knox
To disable all Samsung Knox packages:
Code:
for p in $(pm list packages |grep nox) ; do echo $p | busybox awk -F ":" '{print $2}' | xargs pm disable ; done
pm disable com.samsung.klmsagent
pm disable com.policydm
To remove all Samsung Knox packages:
Code:
for p in $(pm list packages -f|grep nox) ; do echo $p | busybox awk -F "/" '{print "/"$2"/"$3"/"$4}' | xargs rm -r ; done
To remove all data from disabled packages:
Code:
for p in $(pm list packages -d) ; do echo $p | busybox awk -F ':' '{print "/data/data/" $2}' | xargs rm -r ; done
Disable Knox (hidden) services
Code:
stop
mv /system/container /system/container.OFF
rm /data/dal*/arm/*
sync
reboot
EDIT 09-02-2017: Added /etc/mixer-paths.xml for increased volume on speaker, headphone and handset speaker.
Finding the proper loudness values can be done from the shell command line with tinymix command.
example:
Code:
tinymix (see all audio objects)
tinymix "RX1 Digital Volume" (see all possible values for this audio object)
tinymix "RX1 Digital Volume" 86
Note that a value of 83 represents 0dB.
Some extra settings for system, global and secure db (/data/system/users/0/settings_system.xml etc)
Find yours with settings list system, global or secure. These settings are Android version (API23 in this case)
related. Beware of that when copying it from xda or anywhere else.
Code:
settings put system enable_mtp_settings 1
settings put system intelligent_sleep_mode 1
settings put system white_lockscreen_statusbar 0
#settings put system white_lockscreen_wallpaper 1
settings put system lockscreen_wallpaper_transparent 0 (1=hard to see statusbar)
settings put system adaptive_fast_charging 1
settings put system simple_status_bar 0
settings put system data_powersaving_mode 0
settings put system data_usage_on_lockscreen_sim1 1
settings put system min_minder 1
settings put system csc_pref_camera_quality_key 0
settings put system csc_pref_camera_videoquality_key 0
settings put system csc_pref_camera_burstshot_key 1
settings put system csc_pref_camera_autonightdetection_key 1
settings put system csc_pref_camera_forced_shuttersound_key 0
settings put global ble_scan_always_enabled 0
settings put global bluetooth_discoverable_timeout 120
settings put global wifi_watchdog_poor_network_test_enabled 0
settings put global wifi_scan_always_enabled 0 (0)
settings put global wifi_idle_ms 1800000 (def is 900000=15min)
settings put global wifi_suspend_optimizations_enabled 1
settings put global wifi_networks_available_notification_on 0
settings put global wifi_max_dhcp_retry_count 3
settings put global wifi_mobile_data_transition_wakelock_timeout_ms 5000
#settings put global heads_up_snooze_length_ms 2000
#settings delete global heads_up_snooze_length_ms
settings put global heads_up_notifications_enabled 1
settings put global low_power_back_data_off 1 (drop data conn if low pwr
settings put global low_power_trigger_level 5 (5% batt is low pwr)
settings put secure button_key_light 0
settings put secure long_press_timeout 300
settings put secure location_mode 2
#0 = LOCATION_MODE_OFF
#1 = LOCATION_MODE_SENSORS_ONLY
#2 = LOCATION_MODE_BATTERY_SAVING
#3 = LOCATION_MODE_HIGH_ACCURACY
PS: Don't quote this post. Is is considered useless and annoying.
PS2: more Samsung MM mods/tweaks can be found in this xda thread.
PS3: added meizu camera mod apk with very good image quality (Smaller version here https://forum.xda-developers.com/moto-g/themes-apps/camera-app-t3283962)
tweakradje said:
Here are a few tricks that work with stock ROM. For some you need to change /system/build.prop, some are Samsung CSC features with the /system/csc/feauture.xml file or Android system settings db.
For some I cannot remember if it was already visible without tweaks. Anyway lets go
I put feature.xml (with a lot of nonworking csc features too!!!), build.prop and disabled_services.txt in attachement.
Reboot after putting new feature.xml in /system/csc folder. Permissions of the file: root.root 644, same for build.prop
Call Recording: <CscFeature_VoiceCall_ConfigRecording>RecordingAllowed</CscFeature_VoiceCall_ConfigRecording>
Call blocking: <CscFeature_Setting_EnableMenuBlockCallMsg>TRUE</CscFeature_Setting_EnableMenuBlockCallMsg>
Voice Recorder Quality: <CscFeature_VoiceRecorder_SupportRecordingQualitySetting>TRUE</CscFeature_VoiceRecorder_SupportRecordingQualitySetting>
Camera Shutter Sound:
build.prop ro.camera.sound.forced=0
<CscFeature_Camera_ShutterSoundMenu>TRUE</CscFeature_Camera_ShutterSoundMenu>
Data Usage on Quickpanel: <CscFeature_SystemUI_SupportDataUsageViewOnQuickPanel>TRUE</CscFeature_SystemUI_SupportDataUsageViewOnQuickPanel>
Multi Window: (sort of working, use recent apps button to see effect, landscape and portrait)
build.prop persist.sys.debug.multi_window=1
<CscFeature_Framework_ConfigMultiWindowTrayBarFunction>TRUE</CscFeature_Framework_ConfigMultiWindowTrayBarFunction>
I disabled a lot of bloatware using the pm disable command (too much for you I guess). Also in attachement.
Cheers
Click to expand...
Click to collapse
Cool, but when multi window is enabled, don.t you get the scroll bug in recents apps? (especially in the bottom part of the screen)
Yes the bug is there. Pull down notifications corrects it shortly. Multi Window on small screens is not my thing anyway.
Can I enable multi-window in J500F the same way? Would love to have two apps on screen simultaneously.
Perhaps, what's the scroll bug?
Added information of how to increase volume on different audio outputs with /etc/mixer-paths.xml and test it with the tinymix command.
tweakradje said:
Added information of how to increase volume on different audio outputs with /etc/mixer-paths.xml and test it with the tinymix command.
Click to expand...
Click to collapse
tinymix "RX1 Digital Volume" 86 gives me tinymix is not executable.
chmod 755 does not return error but still not executable.
putting <ctl name="RX1/2/3 Digital Volume" value="86"/> or even 90 in the mixer_paths.xml and reboot does't increase the volume.
I'm missing something ?
What ROM are you on then? I have stock.
Dude I don't understand how to use this. Please help me. I really want these features.
Added my latest build.prop and init.qcom.post_boot.sh
Antutu score with stock ROM and Cherry Kernel 3.10.94
Hi how to remove "system unauthorised action "when i'am instal custom kernel on stockrom
adf18224 said:
Hi how to remove "system unauthorised action "when i'am instal custom kernel on stockrom
Click to expand...
Click to collapse
The notification or smart manager alert?
Wizardlysense said:
The notification or smart manager alert?
Click to expand...
Click to collapse
Smart manager sir
temp root exploit for LG V50 ThinQ with android 10 firmware
including temporal magisk setup from the exploit
The exploit uses CVE-2020-0041 originally designed for Pixel 3 running kernel 4.9.
I have adapted the Pixel 3 specific exploit for kernel 4.14 that is used with LG phones running Android 10 with March security patch level.
This work has been done upon request of @Inerent who contributed not only with very fine donations, but also did all the testing on his LG phone, as I do not own any LG phone myself.
As an addon I have implemented setup of magisk v20.4 from temp root exploit included su permission asking notification support, that has been also a hell of work to get working.
SUPPORTED TARGETS
You can find currently running fw version with 'getprop ro.vendor.lge.factoryversion' command run in an adb shell.
LMV500NAT-00-V20m-LAO-COM-MAR-10-2020+0 - LG V50 ThinQ with V500N20m fw, 2020-03-01 security patch level
LMV500NAT-00-V20f-LAO-COM-JAN-31-2020+0 - LG V50 ThinQ with V500N20f fw, 2020-01-01 security patch level
LMV500NAT-00-V20b-LAO-COM-DEC-23-2019+0 - LG V50 ThinQ with V500N20b fw, 2019-12-01 security patch level
LMV500AT-00-V20g-LAO-COM-MAR-10-2020+0
LMV500AT-00-V20a-LAO-COM-JAN-24-2020+0
LMV500AT-00-V20e-LAO-COM-JAN-23-2020+0
LMV450AT-00-V20a-LAO-COM-JAN-15-2020-ARB00+2 - LG V50 ThinQ Sprint fw, 2020-01-01 security patch level
Please note, it is unlikely that any other fw version than those listed above would work.
The only (unlikely) case when the exploit could work with different fw version (or different phone model) would be that they would use binary identical kernel image in the firmware.
USAGE HOWTO
be sure to run supported firmware version on your phone (you may need to downgrade, involving factory reset)
enable developer mode options and in there adb debugging (eventually install adb drivers)
download the v50g8-mroot3.zip with the exploit attached in this post and unzip it
use 'adb push v50g8-mroot3 /data/local/tmp' and get temp root with following commands in 'adb shell':
Code:
cd /data/local/tmp
chmod 755 ./v50g8-mroot3
./v50g8-mroot3
If it worked, you should see something like this:
Code:
[+] Mapped 200000
[+] selinux_enforcing before exploit: 1
...
[+] Launching privileged shell
root_by_cve-2020-0041:/data/local/tmp # getenforce
Permissive
root_by_cve-2020-0041:/data/local/tmp # id
uid=0(root) gid=0(root) groups=0(root) context=kernel
root_by_cve-2020-0041:/data/local/tmp #
In case you get 'target is not supported', you may list supported targets with
Code:
./v50g8-mroot3 -T
and try to force one close to yours using '-t num' option.
Please see the 2nd post for magisk setup from temp root details.
Please be careful what you use the temp root for.
Changing something in partitions protected by dm-verity (or Android Verified Boot 2.0), like for example /system, /vendor or kernel boot partition, can result with a not anymore booting phone.
In such case you would need a way to emergency flash stock firmware to recover.
This is why it is called 'temp root' - you get a root shell only temporarily, it is lost with reboot and it does not allow to make permanent changes in crucial partitions until bootloader unlock is achieved.
Some partitions might still be possible to modify - for example in case of sony xperia phones it was possible to do permanent debloat via changes in /oem partition and such debloat would survive even factory reset. Similarly some modem configs have been present in /oem allowing to setup IMS for different operators/regions or tune other modem related stuff.
SOURCES
Exploit sources for all releases are available at my github here.
CREDITS
Big thanks to Blue Frost Security for the excellent writeup and the exploit itself.
DONATIONS
If you like my work, you can donate using the Donate to Me button with several methods there.
Already donated:
@Catalin Oprea ($710)
Luis Rosado ($30)
Kirn Gill ($6) LG V60 user
Android Maisters ($30)
Matthew Hinkle ($40)
Daniel Novo ($22)
Tony Romeo ($56)
Yurii Boiko ($20)
VL48 ($33)
Savcho Savchev ($30)
Josue W ($15)
Reyna Cruz ($15)
Tyler Thompson ($3)
Tam Van Phan ($8,4)
MR D CRANSON ($25)
Gilberto Lozada ($15)
Keith Young ($45)
Zee Bee ($11)
Kevin Borges ($50) root bounty at gofundme.com
Catalin Oprea (+$50) root bounty at gofundme.com
Luke Miller ($50) root bounty at gofundme.com
@AngryManMLS ($20)
@Shtiff1 ($20)
Thank you very much to all who donated or are about to donate.
DOWNLOAD
MAGISK SETUP FROM TEMP ROOT WITH LOCKED BOOTLOADER
To enjoy the temporal root with apps asking for root permission, you can now start magisk v20.4 from the root shell provided by the exploit.
download the v50g8-mroot3.zip with the exploit attached in the first post
download Magisk-v20.4.zip from magisk releases page on github here
use 'adb push v50g8-mroot3.zip Magisk-v20.4.zip /data/local/tmp' to copy the zips to the phone
unzip and prepare magisk setup with following commands in 'adb shell'
Code:
cd /data/local/tmp
unzip v50g8-mroot3.zip
chmod 755 v50g8-mroot3 magisk-setup.sh magisk-start.sh
./magisk-setup.sh
get temp root and start magisk up with following commands in 'adb shell':
Code:
cd /data/local/tmp
./v50g8-mroot3
./magisk-start.sh -1
./magisk-start.sh -2
./magisk-start.sh -3
just this point should be done after each reboot to get magisk running again.
NOTE: please be sure to enter each command separately, line after line - do not paste all in a single block and do not put them in a script.
There are reasons this is divided in 3 stages. With this approach I got the best stability, while putting ./v50g8-mroot3 together with -1 and/or -2 stuff in a single script run resulted with a reboot most of the time.
Phases 2 and 3 need to be split for functional reasons to start magisk with working su permission asking notification.
If it worked, you should see something like this:
Code:
flashlmdd:/ $ cd /data/local/tmp
flashlmdd:/data/local/tmp $ ./v50g8-mroot3
[+] factoryversion = LMV500NAT-00-V20m-LAO-COM-MAR-10-2020+0
[+] Mapped 200000
[+] selinux_enforcing before exploit: 1
[+] pipe file: 0xffffffd07822fa00
[+] file epitem at ffffffd102da6d00
[+] Reallocating content of 'write8_inode' with controlled data...............[DONE]
[+] Overwriting 0xffffffd07822fa20 with 0xffffffd102da6d50...[DONE]
[+] Write done, should have arbitrary read now.
[+] file operations: ffffff9dee01ebf8
[+] kernel base: ffffff9dece80000
[+] Reallocating content of 'write8_selinux' with controlled data..[DONE]
[+] Overwriting 0xffffff9def290000 with 0x0...[DONE]
[+] init_cred: ffffff9def02fcd0
[+] memstart_addr: 0xfffffff040000000
[+] First level entry: ae7f6003 -> next table at ffffffd06e7f6000
[+] Second level entry: ae419003 -> next table at ffffffd06e419000
[+] sysctl_table_root = ffffff9def05c710
[+] Reallocating content of 'write8_sysctl' with controlled data.......[DONE]
[+] Overwriting 0xffffffd1316fc268 with 0xffffffd0ba748000...[DONE]
[+] Injected sysctl node!
[+] Node write8_inode, pid 7109, kaddr ffffffd0c1193700
[+] Replaced sendmmsg dangling reference
[+] Replaced sendmmsg dangling reference
[+] Replaced sendmmsg dangling reference
[+] Node write8_selinux, pid 6726, kaddr ffffffd08bfeb400
[+] Replaced sendmmsg dangling reference
[+] Replaced sendmmsg dangling reference
[+] Replaced sendmmsg dangling reference
[+] Node write8_sysctl, pid 6772, kaddr ffffffd0afc0d000
[+] Replaced sendmmsg dangling reference
[+] Replaced sendmmsg dangling reference
[+] Replaced sendmmsg dangling reference
[+] Cleaned up sendmsg threads
[+] epitem.next = ffffffd07822fa20
[+] epitem.prev = ffffffd07822fad8
[+] Launching privileged shell
root_by_cve-2020-0041:/data/local/tmp # ./magisk-start.sh -1
+ FRESH=false
+ '[' -1 '=' --fresh ']'
+ '[' ! -e /data/adb/magisk/busybox ']'
+ ./magiskpolicy --live --magisk 'allow dumpstate * * *'
Load policy from: /sys/fs/selinux/policy
root_by_cve-2020-0041:/data/local/tmp # ./magisk-start.sh -2
+ FRESH=false
+ '[' -2 '=' --fresh ']'
+ '[' ! -e /data/adb/magisk/busybox ']'
+ STAGE=2
+ '[' 2 '=' 2 ']'
+ mount -t tmpfs -o 'mode=755' none /sbin
+ chcon u:object_r:rootfs:s0 /sbin
+ chmod 755 /sbin
+ cp -a magisk/boot_patch.sh /sbin
+ cp -a magisk/magiskboot /sbin
+ cp -a magisk/magiskinit64 /sbin
+ cp -a magisk/busybox /sbin
+ cp -a magisk/util_functions.sh /sbin
+ cd /sbin
+ chmod 755 boot_patch.sh busybox magiskboot magiskinit64 util_functions.sh
+ mkdir r
+ mount -o bind / r
+ cp -a r/sbin/. /sbin
+ umount r
+ rmdir r
+ mv magiskinit64 magiskinit
+ ./magiskinit -x magisk magisk
+ ln -s /sbin/magiskinit /sbin/magiskpolicy
+ ln -s /sbin/magiskinit /sbin/supolicy
+ false
+ chcon -R u:object_r:magisk_file:s0 /data/adb/magisk
+ rm -f magiskboot util_functions.sh boot_patch.sh
+ ln -s /sbin/magisk /sbin/su
+ ln -s /sbin/magisk /sbin/resetprop
+ ln -s /sbin/magisk /sbin/magiskhide
+ mkdir /sbin/.magisk
+ chmod 755 /sbin/.magisk
+ >/sbin/.magisk/config
+ echo 'KEEPVERITY=true'
+ >>/sbin/.magisk/config
+ echo 'KEEPFORCEENCRYPT=true'
+ chmod 000 /sbin/.magisk/config
+ mkdir -p /sbin/.magisk/busybox
+ chmod 755 /sbin/.magisk/busybox
+ mv busybox /sbin/.magisk/busybox
+ mkdir -p /sbin/.magisk/mirror
+ chmod 000 /sbin/.magisk/mirror
+ mkdir -p /sbin/.magisk/block
+ chmod 000 /sbin/.magisk/block
+ mkdir -p /sbin/.magisk/modules
+ chmod 755 /sbin/.magisk/modules
+ mkdir -p /data/adb/modules
+ chmod 755 /data/adb/modules
+ mkdir -p /data/adb/post-fs-data.d
+ chmod 755 /data/adb/post-fs-data.d
+ mkdir -p /data/adb/service.d
+ chmod 755 /data/adb/service.d
+ chcon -R -h u:object_r:rootfs:s0 /sbin/.magisk
+ chcon u:object_r:magisk_file:s0 /sbin/.magisk/busybox/busybox
+ /sbin/magisk --daemon
client: launching new main daemon process
+ pidof magiskd
+ MP=14148
+ '[' -z 14148 ']'
+ >/sbin/.magisk/escalate
+ echo 14148
+ '[' -e /sbin/.magisk/escalate ']'
+ sleep 1
+ '[' -e /sbin/.magisk/escalate ']'
root_by_cve-2020-0041:/data/local/tmp # ./magisk-start.sh -3
+ FRESH=false
+ '[' -3 '=' --fresh ']'
+ '[' ! -e /data/adb/magisk/busybox ']'
+ STAGE=3
+ '[' 3 '=' 2 ']'
+ >/sbin/.magisk/magiskd
+ echo -e '#!/system/bin/sh\n/sbin/magisk --daemon'
+ chmod 755 /sbin/.magisk/magiskd
+ chcon u:object_r:dumpstate_exec:s0 /sbin/.magisk/magiskd
+ getprop init.svc.dumpstate
+ SVC=''
+ timeout=10
+ '[' 10 -gt 0 ']'
+ stop dumpstate
+ killall -9 magiskd
+ stop dumpstate
+ mount -o bind /sbin/.magisk/magiskd /system/bin/dumpstate
+ start dumpstate
+ timeout=10
+ '[' 10 -le 0 ']'
+ pidof magiskd
+ MP=14165
+ '[' -n 14165 ']'
+ break
+ stop dumpstate
+ sleep 1
+ umount /system/bin/dumpstate
+ rm -f /sbin/.magisk/magiskd
+ '[' '' '=' running ']'
+ rm -f /dev/.magisk_unblock
+ /sbin/magisk --post-fs-data
+ timeout=10
+ '[' -e /dev/.magisk_unblock -o 10 -le 0 ']'
+ sleep 1
+ timeout=9
+ '[' -e /dev/.magisk_unblock -o 9 -le 0 ']'
+ /sbin/magisk --service
+ sleep 1
+ /sbin/magisk --boot-complete
+ chmod 751 /sbin
root_by_cve-2020-0041:/data/local/tmp # id
uid=0(root) gid=0(root) groups=0(root),1004(input),1007(log),1011(adb),1015(sdcard_rw),1028(sdcard_r),3001(net_bt_admin),3002(net_bt),3003(inet),3006(net_bw_stats),3009(readproc),3011(uhid) context=u:r:magisk:s0
root_by_cve-2020-0041:/data/local/tmp # uname -a
Linux localhost 4.14.117-perf #1 SMP PREEMPT Tue Mar 10 18:44:38 KST 2020 aarch64
root_by_cve-2020-0041:/data/local/tmp # getenforce
Permissive
Now you can exit the temp root shell and use 'su' to get a root shell controlled by magisk manager or allow other apps that need root as asking for root permission now works.
You can even re-enable selinux like this from 'adb shell':
Code:
su -c 'setenforce 1'
The magisk setup from exploit including working permission asking has been fully developed by me, it uses some novel techniques to overcome the limitations caused by magisk run from a temp root instead of being integrated in boot process as a service.
TIPS FOR BETTER STABILITY OF THE EXPLOIT
The exploit works based on use after free, that means it depends on state of memory heap and how it changes during exploit time.
That means there is some portion of unpredictability and a chance that something else is overwritten than hoped for by shaping the heap.
So to get best results, one should stop anything that could run in background, like:
set airplain mode, turn off wifi and bluetooth so there is no data connection at all
set "Stay awake" to ON while charging (i.e. using adb shell) in developer options
disable auto updates of system and apps
debloat your system so useless apps do not run in background
reboot your phone having all the above
wait two minutes after boot up with phone unlocked, screen on connected to PC via usb cable having 'adb shell' already active (checking with 'uptime' command)
start the exploit
after getting root shell and succesfuly starting magisk, do not forget to properly exit the temp root shell by use of 'exit' command two times, so the 'adb shell' with the exploit is ended with the rest of clean up
CHANGELOG
2020-05-11 : Initial release (V500N20m-testJ) supporting V500N20m all Korean variants
2020-05-16 : multiple targets supported (v50g8-root)
2020-05-20 : v50g8-dump tool to dump kernel space memory available in G8 thread
2020-05-24 : implemented support for magisk start from the exploit (v50g8-mroot), added support for V50 Sprint with 2020-01-01 security patch level
2020-06-10 : fixed problem when V50 rebooted/crashed soon after obtaining temp root shell, released as v50g8-mroot2
2020-06-23 : hopefully stability improved even more with V50 allowing stable magisk start from temp root, released as v50g8-mroot3
Ok guys, OK!!!!
Here is a guide made for noobs for Root (download, extract and copy root file inside platform tools folder) and Backup in it, using Adb Platform Tools
Root and Backup V50 Korea
1. Download LG V50 Root (extract it and copy inside platform tools folder), Platform Tools ADB and LG USB Drivers 4.4.2 and install it
https://forum.xda-developers.com/v5...g-v50-temp-root-exploit-via-cve-2020-t4098077
https://www.mediafire.com/file/mu78ydkoalgfzyd/platform_tools_adb.zip/file
http://tool.lime.gdms.lge.com/dn/downloader.dev?fileKey=UW00120120425
2. Connect USB then Enable Developer Options and USB Debugging and enable Stay Awake Screen
3. Turn off wifi, data, bluetooth restart phone, unlock screen and let it 1 minute to load all processes
4. Run Power shell command from inside platform tools folder (SHIFT+right mouse and open power shell here) and type cmd and hit enter
5. Run command - adb devices - a pupup should appear on your phone - tap Allow and Remember it on your phone!
6. Run one by one the following commands
adb push V500N20m-testJ /data/local/tmp
adb shell
cd /data/local/tmp
chmod 755 ./V500N20m-testJ
./V500N20m-testJ
7. When rooted you will have this lines in terminal
[*] Launching privileged shell
root_by_cve-2020-0041:/data/local/tmp #
If root is not achieved or phone restarts by itself repeat from step 3
Backup Important non KDZ Stuff like IMEI
1. Download this file backupselected.sh and move it inside your adb program This is already pushed to Platform Tools folder so ignore it
https://www.mediafire.com/file/gh00t76n4ctc061/backupselected.sh/file
2. Run this command from cmd
adb push backupselected.sh /data/local/tmp
3. Obtain Temp Root and from root shell run these
chmod -R 777 /data/local/tmp
./backupselected.sh
4. Backup will be saved in Download folder on your phone
Usefull Commands - Maybe @j4nn can help us with more usefull commands
rm *.* - delete all files
rm -rf (folder name) - delete that folder
adb push (folder or file name) /data/local/tmp - copy that folder or file name to that /data/local/tmp address
cd /data/local/tmp - then - pm install (appname) - installs it
Thank you. Can't wait for the G8 root guide!
Excellent someday we will have the Bootloader unlocked and for being to install the R
ags
j4nn said:
temp root exploit for LG V50 ThinQ with android 10 firmware
...................................................................Mod Edit: Removed bulk of unnecessarily quoted OP.........................................................
Thank you very much to all who donated or are about to donate.
DOWNLOAD
Click to expand...
Click to collapse
Mod Edit: Please DO NOT quote the entire OP. Either use HIDE tags or trim the quote as I did. Thank you.
Awesome patiently waiting for spring g8 to be compatable.
Received 150 USD to my paypal from Kevin Borges with following comment:
KanBorges said:
Thank you so much for your work. This is all the money in the bounty I set up on Gofundme. com. My username in XDA is @KanBorges . Again, thank you! Hopefully you can get twrp/magisk soon.
Click to expand...
Click to collapse
Thank you and all other contributors for the donations.
I've updated the first post (not only the donations list but added some more clarifications too).
Please note, as discussed since beginning with @Inerent, only the temp root exploit has been supposed to be implemented by me.
There is however available an engineering booloader, that may eventually allow to unlock bootloader after flashing from temp root.
This needs to be tested first and can involve some risks to brick the phone.
I do not own any LG phone (and do not even want one), so I am not doing that, sorry.
But I've already checked few things regarding the engineering bootloader and I can conclude, that it could be compatible in the sense that it most likely would not brick the device.
The reason I see that comparing stock firmware ABL image and the eng bootloader (aka ABL) seems that both use the same signing root certificate and they both have identical OU info in the signature certificate:
Code:
OU=07 0001 SHA256,
OU=06 0000 MODEL_ID,
OU=05 00000000 SW_SIZE,
OU=04 0031 OEM_ID,
OU=03 0000000000000001 DEBUG,
OU=02 000A50E100310000 HW_ID,
OU=01 000000000000001C SW_ID
If it would work with android 10 is another question though.
Please find attached source for split utility, to get some parts of the image likely to start with a signature certificate.
Those parts then can be converted to text form representation of the certificate via following command for example:
Code:
openssl x509 -in LUN4_abl_a_COM3.img-001238 -inform der -text -noout > LUN4_abl_a_COM3.img-001238.txt
Yes, Jann, thats true. But thx for helping us with some advices. I hope we are a big community (also users are coming from LG v30 and V40) and will figure this out, or rise another bounty if not.
Thx for helping us!
$20 donation sent to @j4nn from me. Thanks for the hard work.
@AngryManMLS, thank you for the donation. Updated the first post.
LG G8
Inerent said:
It seems this lg g820UM is the code for all USA carriers and Canada and should work for all like for koreans
If you do March root it will be compatible with February or January? If yes then pick March firmware.
Firmwares here.:
https://lg-firmwares.com/lg-lmg820um-firmwares/
Click to expand...
Click to collapse
Please note, if the exploit works with March firmware, it does not make it compatible with any other older firmwares, even if they are vulnerable.
The kernel build (binary image) is different there, i.e. it would need different offsets in the exploit to succeed.
The reason for selecting March security patch level with LG V50, i.e. the V500N20m firmware version, has been in order to exploit the newest still exploitable firmware.
The bug has been fixed in LG kernel since April security patch level, so using March fw allows you to use the latest still vulnerable and the most up to date fw for the temp root.
For other targets like the G8 might be useful to select other fw version if there are multiple variants that would use identical kernel binary image, possibly even not having a downloadable fw release for a variant, while existing for another variant (this may be a case if phone variants have identical or nearly the same hw).
j4nn said:
For other targets like the G8 might be useful to select other fw version if there are multiple variants that would use identical kernel binary image, possibly even not having a downloadable fw release for a variant, while existing for another variant (this may be a case if phone variants have identical or nearly the same hw).
Click to expand...
Click to collapse
The difficult thing is that the G8 variants are all over the place with which firmware/security patch they are on. My T-Mobile variant (G820TM) is on January 2020 meanwhile say the Verizon variant (G820UM) is on February 2020. So it's a mess which pretty much tells me each variant will need to have it's own exploit made for it.
Edit: Just found out the G820UM just got the April security update. KDZ isn't out yet for that.
j4nn said:
Please note, if the exploit works with March firmware, it does not make it compatible with any other older firmwares, even if they are vulnerable.
The kernel build (binary image) is different there, i.e. it would need different offsets in the exploit to succeed.
The reason for selecting March security patch level with LG V50, i.e. the V500N20m firmware version, has been in order to exploit the newest still exploitable firmware.
The bug has been fixed in LG kernel since April security patch level, so using March fw allows you to use the latest still vulnerable and the most up to date fw for the temp root.
For other targets like the G8 might be useful to select other fw version if there are multiple variants that would use identical kernel binary image, possibly even not having a downloadable fw release for a variant, while existing for another variant (this may be a case if phone variants have identical or nearly the same hw).
Click to expand...
Click to collapse
Hello, I've been talking to inherent on telegram; I think he sent you some of my outputs / logs. I'm sorry I haven't been able to donate as I'm unfortunately not old enough to do so. I've got a Sprint g8 which is stuck on the Android 10 beta on November patch. If you adapt this for other g820um variants, will it likely work with my patch or not?
@AngryManMLS, most likely April security fixed the bug making it not exploitable anymore.
Yes, each kernel build/image would need specific support in the exploit.
@antintin, I need the binary image of kernel used in the firmware that is running the phone we would target with the temp root exploit in order to develop support for it.
Is your Android 10 beta on November patch firmware downloadable anywhere?
Or can you flash any other firmware?
Can you say which G8 model/carrier would have identical hardware to your Sprint G8, while having a downloadable fw?
j4nn said:
@AngryManMLS, most likely April security fixed the bug making it not exploitable anymore.
Yes, each kernel build/image would need specific support in the exploit.
@antintin, I need the binary image of kernel used in the firmware that is running the phone we would target with the temp root exploit in order to develop support for it.
Is your Android 10 beta on November patch firmware downloadable anywhere?
Or can you flash any other firmware?
Can you say which G8 model/carrier would have identical hardware to your Sprint G8, while having a downloadable fw?
Click to expand...
Click to collapse
Well I'm not entirely certain, maybe I can ask vl48. I think any g820um should be fine though. I doubt there is any beta kdz available to download, however. I unfortunately can only go on the final pie version or November patch beta 10 on my Sprint. My updates are broken :
After the temp root, can we flash Magisk patched boot img to /dev/block/bootdevice/by-name/boot_a or something like that? Does it still work after a reboot
@quantan, most likely not, due to dm-verity/AVB 2.0 - it is a temp root...
Magisk (with possibly limited functionality) may be eventually started from the exploit, but it seems not to work yet...
Would be good to at least have android 10 on the Australian V50 but we can't even get that.
Will never buy lg again.
snake65 said:
Would be good to at least have android 10 on the Australian V50 but we can't even get that.
Will never buy lg again.
Click to expand...
Click to collapse
That is not LG fault, is your carrier one. Wait patiently, pretty soon all our problems are resolved.
snake65 said:
Would be good to at least have android 10 on the Australian V50 but we can't even get that.
Will never buy lg again.
Click to expand...
Click to collapse
I have to agree with you on this one. Right now, LG is getting it's lunch eaten by many Chinese OEMs and their bleeding cash in the smartphone business. LG latest "FLAGSHIP", the V60, is a d*** joke when comparing it's 60Hz screen refresh rate to any new smartphone. It's selling for $809.99 new on Tmob and their already selling for less than $700 on Ebay. By end of summer, $390?
I too "Will never buy LG again!".
BTW, I have an Essential PH-1, admittedly old hardware but I'm already running Android 11 DP4 as a daily with very few problems. The V50 won't see 11 for what....... 18 months?