Hi,
You need to be rooted. Why to use Andromeda if you are rooted, you might wonder. Well, it runs miles better, there is no difference in speed between a themed and a not themed app. With a root Substratum, the difference is quite noticeable, for the worst.
Plus, I used magisk, although it should also be runnable from within Tasker, Auto Tools, or something alike, or simply with /system/etc/init.d support, which my P20 Pro lacks. The init.d injector magisk module didn't work either.
Hence I've modified the official linux adb script to be run at init directly on the phone. Due to the missing init.d support on many phones, like mine, I placed the script on /magisk/.core/service.d since I already had magisk installed
I also
Code:
ln -s /magisk/.core/service.d /system/etc/init.d
to make it easier to remember and have init.d support
The sleep timer might need to be increased, I tried to wait for projekt.substratum to be running but it was not enough, so unless someone can shed light on what other process to wait for, the sleep will do.
So download the script, rename it to start_andromeda-android.sh, and
Code:
adb push start_andromeda-android.sh /magisk/.core/service.d/
adb shell
su
chown 0:0 /magisk/.core/service.d/start_andromeda-android.sh
chmod 0755 /magisk/.core/service.d/start_andromeda-android.sh
#### optional, if your phone lacks /system/etc/init.d support, and you want to simulate it with magisk
# mount -o remount,rw /system
## if /system/etc/init.d exists and is not functional, like on my P20 Pro, just do
# rm -fr /system/etc/init.d
# ln -s /magisk/.core/service.d /system/etc/init.d
# mount -o remount,ro /system
# start_andromeda-android.sh
Code:
#!/system/bin/sh
sleep 15
# Let's first grab the location where Andromeda is installed
pkg=$(pm path projekt.andromeda)
# Due to the way the output is formatted, we have to strip 10 chars at the start
pkg=$(echo $pkg | cut -d : -f 2 | sed s/\\r//g)
# Now let's kill the running Andromeda services on the mobile device
kill=$(pidof andromeda)
# Check if we need to kill the existing pids, then kill them if need be
if [ -z "$kill" ]; then[INDENT]am force-stop projekt.substratum
appops set projekt.andromeda RUN_IN_BACKGROUND allow
appops set projekt.substratum RUN_IN_BACKGROUND allow
CLASSPATH=$pkg app_process /system/bin --nice-name=andromeda projekt.andromeda.Andromeda &
[/INDENT]
else
[INDENT]am force-stop projekt.substratum
kill -9 $kill
appops set projekt.andromeda RUN_IN_BACKGROUND allow
appops set projekt.substratum RUN_IN_BACKGROUND allow
CLASSPATH=$pkg app_process /system/bin --nice-name=andromeda projekt.andromeda.Andromeda &
[/INDENT]
fi
Related
Hi Androider’s,
If Carrier IQ has bothered you like it bugged the heck out of me, I have a solution for you. This is not for new users to try. I may try and create an app for this!
1) Create a text file (ciq-off) on your Linux system using the provided code. Windows users should use Notepad++ .(Can’t have any pesky carriage return/line feeds in the file)
2) Use “adb push” to store it on your SD card of your phone. (If you don’t know what adb is, you should have someone help you.)
3) Give the file execute permissions then run the file. ( chmod 644 ciq-off)
4) Your phone should reboot and Carrier IQ will be disabled not to return, even after reboot. (Note: Your carrier can remotely start the app.)
In the future posting, I will attempt to remove the .so files that allows execution. This is a complicated process and the research seems to stretch far and wide at times. However, with enough people using their minds on this issue Carrier IQ will be defeated someday.
[ciq-off script]
HTML:
# Mount Filesytem Read/Write
grep " /system " /proc/mounts | awk '{system("mount -o rw,remount -t "$3" "$1" "$2)}'
#
# Enable Write to goldfish script
chmod 777 /system/etc/init.goldfish.sh
#
# Create append string for startup script
str=$(cat <<EOF
# Carrier IQ Disabler v1.0
su -c "setprop service.iq.active 0"
su -c "pm disable android/com.carrieriq.iqagent.service.IQService"
su -c "pm disable android/com.carrieriq.iqagent.service.receivers.BootCompletedReceiver"
su -c "pm disable android/com.carrieriq.iqagent.service.ui.DebugSettings"
su -c "pm disable android/com.carrieriq.iqagent.service.ui.ShowMessage"
su -c "pm disable android/com.carrieriq.iqagent.client.NativeClient"
su -c "pm disable android/com.carrieriq.iqagent.stdmetrics.survey.android.QuestionnaireLaunchActivity"
su -c "pm disable android/com.carrieriq.iqagent.stdmetrics.survey.android.QuestionnaireActivity"
EOF
)#
# Return script previous permissions
chmod 550 /system/etc/init.goldfish.sh
#
# Reboot Phone
reboot
References:
http://forum.xda-developers.com/showthread.php?t=1373394
http://android-tricks.blogspot.com/2009/01/mount-filesystem-read-write.html
Users:
dmanbuhnik
JoshMiers
Lately I had been researching on how to further secure Android against Exploits, Malware, and Privacy issues. Some, if not most, of this guide is for the more paranoid users but I believe it is usefull information for everyone. I will try to keep it as easy to follow as possible.
Part 1 - ADB & Root:
What is ADB:
ADB (A.K.A the Android Debug Bridge) is a tool used by developers to allow access to an android device via a computer. The program consists of a server (ADBD) which lives on the phone/tablet and the client (ADB) which lives on the computer. This allows dev's to quickly access logs and install applications over a command shell.
The Threat:
While ADB is usefull if it is left on an attacker can use it to gain access to the device and dump logs, bypass the lock screen, root the device, steal credentails and more. One such attack is Kos' P2P-ADB. This framework allows an attack to bypass most (if not all) security if ADB is enabled on the device.
The Solution:
The easiest solution is to simply disable Degbuging. The setting is disabled by default but most custom roms have it enabled. To disable (on ICS/JB) it go to:
Code:
Settings ---> Developer Options ---> Android Debugging
Ensure Android debugging is unchecked.
For the more paranoid:
Adb actually relies on the ADBD binary. On most AOSP roms the binary is stored in /sbin/adbd if you change the permissions to 000 it can no longer execute and can't be used at all. One way to achieve this is by using this init.d script:
Code:
# Disable the adbd daemon
mount -o rw,remount -t rootfs rootfs /
chmod 000 /sbin/adbd
mount -o ro,remount -t rootfs rootfs /
mount -o ro,remount /system
Save the code to a file called 99secure and place it in /etc/init.d/ If your rom supports init.d the script will execute on boot and remove the adbd permissions so it can't run.
What is root/superuser:
The superuser is a special user account used for system administration. Depending on the operating system, the actual name of this account might be: root, administrator, admin or supervisor. In some cases the actual name is not significant, rather an authorization flag in the user's profile determines if administrative functions can be performed.
Click to expand...
Click to collapse
The root user has full access to the system and can perform almost any task. Most custom ROMs ship with root enabled.
The problem:
Running with root enabled is inherently insecure. If a malicous app is allowed to run with root permisions it has full access to the system and can do what ever it wants (delete information, steal passwords, keylog, activate the camera, etc.)
The Solution:
If you are running a CyanogenMod Rom you can disable root by going to:
Code:
Settings ---> Developer Options ---> Root Access ---> Disabled
Alternatively you can change the permisions of the "su" binary to 000 with:
Code:
mount -o rw,remount /system
chmod 000 /system/xbin/su
mount -o ro,remount /system
Part 2 - Bluetooth:
Bluetooth is a great technology that allows close range (~30m) wireless comunication between devices such as headsets and speaker phones.
The Problem:
Bluetooth is a wide open whole for an attacker to gain access to your device. There are multiple exploits against bluetooth (such as bluejacking). While most aren't widely used bluetooth should be disabled when not in use.
The Solution:
Disable bluetooth via the settings app:
Code:
Settings ---> Bluetooth ---> Off
Alternatively you can disable the bluetooth service/daemon:
Code:
mount -o rw,remount /system
chmod 000 /system/bin/bluetoothd
mount -o ro,remount /system
and even the bluetooth device (this was done on a Galaxy Nexus running CM10 JB):
Code:
mount -o rw,remount /system
chmod 000 /dev/ttyO1
mount -o rw,remount /system
After that is done bluetooth can no longer be turned on by accident or a malicous attacker (provided they don't have root).
Part 3 - NFC:
What is NFC:
Near field communication (NFC) is a set of standards for smartphones and similar devices to establish radio communication with each other by touching them together or bringing them into close proximity, usually no more than a few centimetres. Present and anticipated applications include contactless transactions, data exchange, and simplified setup of more complex communications such as Wi-Fi.[1] Communication is also possible between an NFC device and an unpowered NFC chip, called a "tag".[2]
NFC standards cover communications protocols and data exchange formats, and are based on existing radio-frequency identification (RFID) standards including ISO/IEC 14443 and FeliCa.[3] The standards include ISO/IEC 18092[4] and those defined by the NFC Forum, which was founded in 2004 by Nokia, Philips and Sony, and now has more than 160 members. The Forum also promotes NFC and certifies device compliance.[5]
Click to expand...
Click to collapse
As per Wikipedia
The Problem:
This year at defcon NFC was shown to be vulnerable to attack (http://forum.xda-developers.com/showthread.php?t=1832186). Another example is the recent Samsung Exploit which can be executed by NFC tags as well.
The Solution:
NFC can be disabled by:
Code:
Settings --- > Wireless & Networks ---> NFC
Alternatively you can disable the NFC Device:
Code:
mount -o rw,remount /system
chmod 000 /dev/ttyO3
mount -o rw,remount /system
Part 4 - Network Attacks:
Just like a computer android is succeptable to attacks over the network. Bellow is a init.d script that will harden the TCP/IP stack:
Code:
# hardening TCP/IP stack for IPV4
sysctl -w net.ipv4.icmp_echo_ignore_broadcasts=1 #ICMP broadcast
sysctl -w net.ipv4.conf.all.accept_redirects=0 # ICMP redirects ipv4
sysctl -w net.ipv6.conf.all.accept_redirects=0 #ICMP redirects ipv6
sysctl -w net.ipv4.conf.all.send_redirects=0 # ICMP redirects
sysctl -w net.ipv4.conf.all.accept_source_route=0 #source routing disable
sysctl -w net.ipv4.conf.all.forwarding=0 #Forwarding traffic
sysctl -w net.ipv4.conf.all.rp_filter=1
sysctl -w net.ipv4.conf.all.log_martians=1 #filter martians
sysctl -w net.ipv4.tcp_max_syn_backlog=1280 # TCP syn half-opened
sysctl -w net.ipv4.ip_forward=0
sysctl -w net.ipv4.tcp_syncookies=1
Android also runs IPTables ( A firewall). You can change this by script or a nice GUI tool calledDroid Wall
Part 5 - Removing unneeded applications:
These commands will remove some applications that aren't needed and may have internet access. The bottom ones are kept for root only:
Code:
rm -f /system/xbin/irsii
rm -f /system/xbin/nano
rm -f /system/xbin/nc
rm -f /system/xbin/telnet
rm -f /system/xbin/telnetd
rm -f /system/xbin/opcontrol
chmod 740 /system/xbin/rsync
chmod 740 /system/xbin/strace
chmod 000 /system/bin/bluetoothd
chmod 750 /system/bin/iptables
chmod 750 /system/bin/ping]
There may be more you want to remove like ssh.
I personally removed "Packet Management" as well to prevent installing apps over USB:
Code:
# disable the Packet Management binary
chmod 000 /system/bin/pm
Part 6 - Removing APK's:
You can also remove unneeded APK's by:
Code:
mount -o rw,remount /system
rm -r /system/app/[apk name here]
mount -o ro,remount /system
I removed these apps:
Bluetooth.apk
NFC.apk
Development.apk
DrmProvider.apk (You may not want to do this if you use the playstore)
Email.apk ( I use K-9 instead)
Exchange.apk (I don't need it you may)
PackageInstaller.apk ( Used to install apps. Don't remove if you want to install apps).
Click to expand...
Click to collapse
What apps you can and can't remove
Part 7 - Misc:
Personally I don't use the playstore/Google Framework as it sends back WAY to much info for me to trust it. I also reccomend using Full Device Encryption and a secure Kernel such as FuguMod.
Alot of the information I got is from this Sans guide
I will be posting more as I look into other security options
Let me know if I missed anything and please hit thanks if I helped at all.
Bellow is the init.d script I am using (modified from the Sans guide) ** ONLY TESTED ON A GSM GALAXY NEXUS ***:
Code:
#!/system/bin/sh
# Customize some parameters and lockout the SO
# July 2011
mount -o rw,remount /system
# Disable Bluetooth
chmod 000 /dev/ttyO1
#Disable NFC
chmod 000 /dev/ttyO3
# hardening TCP/IP stack for IPV4/IPV6
sysctl -w net.ipv4.icmp_echo_ignore_broadcasts=1 #ICMP broadcast
sysctl -w net.ipv4.conf.all.accept_redirects=0 # ICMP redirects ipv4
sysctl -w net.ipv6.conf.all.accept_redirects=0 #ICMP redirects ipv6
sysctl -w net.ipv4.conf.all.send_redirects=0 # ICMP redirects
sysctl -w net.ipv4.conf.all.accept_source_route=0 #source routing disable
sysctl -w net.ipv4.conf.all.forwarding=0 #Forwarding traffic
sysctl -w net.ipv4.conf.all.rp_filter=1
sysctl -w net.ipv4.conf.all.log_martians=1 #filter martians
sysctl -w net.ipv4.tcp_max_syn_backlog=1280 # TCP syn half-opened
sysctl -w net.ipv4.ip_forward=0
sysctl -w net.ipv4.tcp_syncookies=1
# Removing/ disabling unnecessary binaries. Some of them have access to Internet
rm -f /system/xbin/irsii
rm -f /system/xbin/nano
rm -f /system/xbin/nc
rm -f /system/xbin/telnet
rm -f /system/xbin/telnetd
rm -f /system/xbin/opcontrol
chmod 740 /system/xbin/rsync
chmod 740 /system/xbin/strace
chmod 000 /system/bin/bluetoothd
chmod 750 /system/bin/iptables
chmod 750 /system/bin/ping
## This is the last step of the hardening
# do a backup before
# disable the Packet Management binary
chmod 000 /system/bin/pm
# Disable the adbd daemon
mount -o rw,remount -t rootfs rootfs /
chmod 000 /sbin/adbd
mount -o ro,remount -t rootfs rootfs /
mount -o ro,remount /system
Hardening android
How can I harden android to block certain web site or filtering the prono sites?
Have you made any further progress with locking down your phone. I switched from iPhone to android and I can't help but feel that the iPhone was more secure. Alot of my concern is that on Android I notice that even with a pin lock sometimes apps run on top of it and if you have a lock screen it sometimes seems to circumvent pin codes all together. Is the security of the phone now based on how secure the lock screen is?
As for your mods, It seems like most, if not all, of these mods require root access. Are you suggesting it is more secure to root your device and perform these mods than to leave it stock?
Also, how vulnerable is it to have a phone with an unlocked bootloader and a custom recovery? Doesn't that make it easier for someone with physical access to compromise your phone? I understand you can enable encryption which only encrypts the data partition but what about if the phone is already started up? Is there a way to harden it from physical attack other than disabling ADB?
Thank you
Josh
inaxsesable said:
Have you made any further progress with locking down your phone. I switched from iPhone to android and I can't help but feel that the iPhone was more secure. Alot of my concern is that on Android I notice that even with a pin lock sometimes apps run on top of it and if you have a lock screen it sometimes seems to circumvent pin codes all together. Is the security of the phone now based on how secure the lock screen is?
As for your mods, It seems like most, if not all, of these mods require root access. Are you suggesting it is more secure to root your device and perform these mods than to leave it stock?
Also, how vulnerable is it to have a phone with an unlocked bootloader and a custom recovery? Doesn't that make it easier for someone with physical access to compromise your phone? I understand you can enable encryption which only encrypts the data partition but what about if the phone is already started up? Is there a way to harden it from physical attack other than disabling ADB?
Thank you
Josh
Click to expand...
Click to collapse
Check out my other threads for more information and tweaks like secdroid. As far as iOS goes its pitiful for security I work in computer forensics and the iPhone is the easiest phone to pull data off of. If you want security and or encryption stick android. iOS encryption is defeated by simply turning the phone on ( it loads the keys automatically from hardware). If you need more help please pm as I can reply quicker there!
Sent from my Nexus 4 using xda premium
Check out Secdroid. The thread is still here somewhere or go straight to Google Play...
Sent from my Nexus 10 using xda app-developers app
Tor has a comprehensive how-to
Tor has a comprehensive how-to @ their blog called "mission-impossible-hardening-android-security-and-privacy"
If in file "sys/class/mdnie/scenario" in first byte replace 0 to 1 or 2 or 3 or 4 screen sharpness is increasing (1 more sharp.........4 less sharp.).
my taste
I have tryed 2 and 3. My taste is 3 perfect
is this safe
zeyadhan said:
is this safe
Click to expand...
Click to collapse
Absolutely. I like 3.
alexhc18 said:
Absolutely. I like 3.
Click to expand...
Click to collapse
yeah 3 is nice.But it resets to zero every time I change wallpaper.
any way to make it permanent .
alexhc18 said:
If in file "sys/class/mdnie/scenario" in first byte replace 0 to 1 or 2 or 3 or 4 screen sharpness is increasing (1 more sharp.........4 less sharp.).
Click to expand...
Click to collapse
For some reason, I can never get this to work. When I try to make the changes by navigating to sys/class/mdnie, there's another folder/shortcut that takes me to another minor folder. In there, I see the scenario file and quite a few others. It even has text and no single digit (like my note 2 did) further more, any changes I make to the scenario file never stick. Maybe the T-Mobile US version is different?
When I reboot will the value reset itself? And do I need reboot after changing the value? I'm confused hmm.
RE: OK I figured out the thing that I asked. (I had no time to try those when I asked.)
1) No need to reboot after editing.
2) After reboot you have to re-do it.
Sent from my SM-N900 using XDA Premium HD app
3 looks bad ass. Use root explorer. Its what I used and changed the value easily.
so 0 value is the most sharpness ?
right ?
Sent from my SM-N900 using XDA Premium 4 mobile app
Is there anyway to make it permanent? Rather than redoing anytime when power off or reset. .w
garykcliu said:
Is there anyway to make it permanent? Rather than redoing anytime when power off or reset. .w
Click to expand...
Click to collapse
Make init.d support on mobile and create file "00mdnie" in folder "etc/init.d" with this inside:
#!/system/bin/sh
echo 3 > /sys/class/mdnie/mdnie/scenario
busybox mount -o remount,rw -t auto /system;
busybox chmod -R 777 /system/etc/init.d;
busybox mount -o remount,ro -t auto /system;
Or type in "terminal emulator" : echo 3 > /sys/class/mdnie/mdnie/scenario
Apps camera and gallery resets this to default 0
alexhc18 said:
Make init.d support on mobile and create file "00mdnie" in folder "etc/init.d" with this inside:
#!/system/bin/sh
echo 3 > /sys/class/mdnie/mdnie/scenario
busybox mount -o remount,rw -t auto /system;
busybox chmod -R 777 /system/etc/init.d;
busybox mount -o remount,ro -t auto /system;
Or type in "terminal emulator" : echo 3 > /sys/class/mdnie/mdnie/scenario
Apps camera and gallery resets this to default 0
Click to expand...
Click to collapse
I just followed your guide but still cannot make it work as well.
Perhaps it is too technical for me but anyway thanks so much for your assistance.
By the way, is it possible to make a flashable zip so that we can flash on CWM?
Thank you
garykcliu said:
I just followed your guide but still cannot make it work as well.
Perhaps it is too technical for me but anyway thanks so much for your assistance.
By the way, is it possible to make a flashable zip so that we can flash on CWM?
Thank you
Click to expand...
Click to collapse
First you need busybox. Install this by Stericson: https://play.google.com/store/apps/details?id=stericson.busybox
reboot after installing. Open busybox, use "normal install" method to "system/bin", don't use "smart install".
Then CWM install this:
View attachment zip_init.zip by Ryuinferno
alexhc18 said:
Make init.d support on mobile and create file "00mdnie" in folder "etc/init.d" with this inside:
#!/system/bin/sh
echo 3 > /sys/class/mdnie/mdnie/scenario
busybox mount -o remount,rw -t auto /system;
busybox chmod -R 777 /system/etc/init.d;
busybox mount -o remount,ro -t auto /system;
Or type in "terminal emulator" : echo 3 > /sys/class/mdnie/mdnie/scenario
Apps camera and gallery resets this to default 0
Click to expand...
Click to collapse
#!/system/bin/sh
#Replace the number down here with what you want
VAL=`3`
#init.d commands (optional)
busybox mount -o remount,rw -t auto /system;
busybox chmod -R 777 /system/etc/init.d;
busybox mount -o remount,ro -t auto /system;
#auto check commands
while [ 1 ]
do
VAL1=`cat /sys/class/mdnie/mdnie/scenario`
if [ "$VAL1" != "$VAL" ]
then
echo "$VAL" > /sys/class/mdnie/mdnie/scenario
fi
sleep 1
done
iba21 said:
#!/system/bin/sh
#Replace the number down here with what you want
VAL=`3`
#init.d commands (optional)
busybox mount -o remount,rw -t auto /system;
busybox chmod -R 777 /system/etc/init.d;
busybox mount -o remount,ro -t auto /system;
#auto check commands
while [ 1 ]
do
VAL1=`cat /sys/class/mdnie/mdnie/scenario`
if [ "$VAL1" != "$VAL" ]
then
echo "$VAL" > /sys/class/mdnie/mdnie/scenario
fi
sleep 1
done
Click to expand...
Click to collapse
Unfortunately no matter how hard I tried, I still cannot get it worked.
I have no other alternative but to give up.
Anyway thanks so much for your advice.
You need a rom witch has the init.d script.. or busybox and create the init.d folder + putting the correct permissions
And sure.. you have to create a script witch contains that code
iba21 said:
You need a rom witch has the init.d script.. or busybox and create the init.d folder + putting the correct permissions
And sure.. you have to create a script witch contains that code
Click to expand...
Click to collapse
This is what I have done...I have enabled the init.d support and then go into the etc/init.d folder to create a file '00mdnie' without extension which contains the codes:
------
#!/system/bin/sh
echo 3 > /sys/class/mdnie/mdnie/scenario
busybox mount -o remount,rw -t auto /system;
busybox chmod -R 777 /system/etc/init.d;
busybox mount -o remount,ro -t auto /system;
------
However every time when I shut down or reboot the N900 and then it will automatically reset to 0 and could you please advise when went wrong with the procedures that I am doing.
Thank you so much.
You have to put what i wrote.. all codes
tried that in CM11 4.4.2, manual setting scenario works but its uncomfortable to change it everytime it resets. pasting your code into init.d makes no difference... any ideas? i love sharpness tweaks but don't want to change kernel now so....
Script init.d
00mdnie
Code:
#!/system/bin/sh
# By @criskelo - CriskeloRoms
# Mod By @alexhc18
chmod 777 /sys/class/mdnie/mdnie/scenario
echo 1 > /sys/class/mdnie/mdnie/scenario
chmod 555 /sys/class/mdnie/mdnie/scenario
This prevents the gallery or camera changes the value to 0
:good:
Edit:
chmod 555 /sys/class/mdnie/mdnie/scenario
Read only and execution
Do not write
Edit:
ATTACHED FILES
All in one
Only install by CWM
ADD in your rom
screen sharpness 1
Support-Init.d
Hi Guys, Im Here To Share You My Guide About Reducing Lag At Realtime. But First Heres The Requirements
Note: Use This If You Dont Have Battery Issues. This Method Is Only For Gaming And Multitasking.
Requirements
-An Android Device Running With 4.0.x And Above(Not Sure If Will Work On GB)
-Root Permission
-Busybox Stable Build(Higher Version Is Recommended)
-Terminal Emulator Or Script Manager App From Play Store
-A Custom Recovery Like ClockWorkMod Or Team Win Recovery Project
-Droidedit App From Play Store
Click to expand...
Click to collapse
Instructions
1. Reboot To Recovery Mode
2. Backup Your Device Using Recovery
3. After Backing Up Your Phone, Open DroidEdit App From App Drawer
4. Write The Following Line On DroidEdit App:
Code:
#!/system/bin/sh
mount -o rw,remount /system 2>/dev/null
mount -o rw,remount rootfs 2>/dev/null
mount -o rw,remount / 2>/dev/null
cat >> /system/bin/kill_lag <<EOF
#!/system/bin/sh
# Lag Reducer
while true; do
echo 3 >> /proc/sys/vm/drop_caches;
sleep 2
echo 2 >> /proc/sys/vm/drop_caches;
done;
EOF
chmod 755 /system/bin/kill_lag 2>/dev/null
chown 0:0 /system/bin/kill_lag 2>/dev/null
nohup /system/bin/kill_lag &
exit 0
5. Save It At The Root Of Your Sdcard Then Named It As kill_lag.sh
6. Open Script Manager App
7. Find The kill_lag.sh at /sdcard
8. Tap kill_lag.sh Then Tap Su Icon, Last, Tap Run
9. Wait Then Done
Click to expand...
Click to collapse
Compatibility
This Method Will Work On Any Android Device Unless You Have Root
Note
To All Users, Dont Copy This Guide With Out My Permission.
Thanks To
-Busybox Developers For BusyBox
-All Devs Here At XDA And Also You, Users
-Unix
Setting drop_caches to 3 then back to 2 to free pagecache is a bit of a myth.
It will obviously free some RAM, but it will also spike up the CPU because there's a load as cache is being rebuilt. Ideally drop_cache doesn't need to played with, or at least not a lot (once a day?) otherwise you're just going to trade the false sense of "performance" for battery life.
This how-to describes how to bootstrap and configure Optware-ng. Optware-ng is my Optware firmware-independent fork. This allows to install numerous pre-compiled packages.
Lists of available packages can be found here:
ARMv7 hardfloat
Intel
ARMv7 softfloat
And the project home is currently here:
https://github.com/alllexx88/Optware-ng
Some packages may not work, since not all of them are compatible with android, but most will. There're some pre-requisites you must satisfy before you can proceed:
1. You must be rooted
2. Optware-ng relies on some standard linux commands, the easiest way to make sure you have them is to install Busybox with all the links
3. We'll create Optware-ng initialization script in /system/etc/init.d, so init.d support is needed. If you don't have it, you can either add it (google for how-tos on doing this) or edit your init.rc android startup script to include Optware-ng initialization lines (though adding init.d support is still a better idea)
The following commands should be issued from terminal as root. I suggest you use some SSH server available on the Play Store, and connect via SSH from you PC.
1. This prepares needed environment:
- Optware-ng will be installed to /data/Optware-ng with /opt symlinked to it
- Optware-ng scripts rely on /bin/sh, so we symlink it to /system/bin/sh
- Optware-ng needs /tmp temp dir: we create 64Mb RAM disk there (you may adjust the size if you like)
Code:
mkdir -p /data/Optware-ng
mount -o remount,rw /
ln -s /data/Optware-ng /opt
mkdir /bin
ln -s /system/bin/sh /bin/sh
mkdir /tmp
chmod 777 /tmp
mount -t tmpfs -o size=64M tmpfs /tmp
mount -o remount,ro /
export PATH=$PATH:/opt/bin:/opt/sbin
2. This bootstraps the feed:
2.a) for ARMv7 hardfloat (most modern android devices):
Code:
cd /tmp
wget http://optware-ng.zyxmon.org/buildroot-armeabihf/buildroot-armeabihf-bootstrap.sh
sh buildroot-armeabihf-bootstrap.sh
2.b) for Intel:
Code:
cd /tmp
wget http://optware-ng.zyxmon.org/buildroot-i686/buildroot-i686-bootstrap.sh
sh buildroot-i686-bootstrap.sh
2.c) for the unlikely case where your device is ARMv7, but lacks FPU (softfloat feed):
Code:
cd /tmp
wget http://optware-ng.zyxmon.org/buildroot-armeabi-ng/buildroot-armeabi-ng-bootstrap.sh
sh buildroot-armeabi-ng-bootstrap.sh
Unless you're using ARMv7 softfloat feed, bootstrapping process may appear to be "stuck" on this:
Configuring glibc-locale
Generating locale-archive with default locales ...
Click to expand...
Click to collapse
Don't be frightened: if your device isn't too powerful, it indeed takes a lot of time, but you have to do this just once, so please be patient.
3. Make sure environment needed for Optware-ng is restored after reboots, and also run Optware-ng startup scripts on boot:
Create init.d startup script and make it executable
Code:
mount -o remount,rw /system
echo '#!/system/bin/sh
mount -o remount,rw /
ln -s /data/Optware-ng /opt
mkdir /bin
ln -s /system/bin/sh /bin/sh
mkdir /tmp
chmod 777 /tmp
mount -t tmpfs -o size=64M tmpfs /tmp
mount -o remount,ro /
sleep 2
export PATH=$PATH:/bin:/opt/bin:/opt/sbin
for script in `ls /opt/etc/init.d/S*`; do
$script start
done' > /system/etc/init.d/S99Optware-ng
chmod 755 /system/etc/init.d/S99Optware-ng
mount -o remount,ro /system
Once again, you may adjust this line
Code:
mount -t tmpfs -o size=64M tmpfs /tmp
if you want greater/lesser RAM disk on /tmp
(4.) You're basically done, but I suggest you now install Optware-ng's dropbear-android package to act as an SSH server:
Code:
ipkg update
ipkg install dropbear-android
dropbear configs are stored in /opt/etc/default/dropbear and by default are:
Code:
DROPBEAR_ENABLE=no
DROPBEAR_PORT=2222
DROPBEAR_PASSWORD=password
Run these commands to adjust configs, enable dropbear and start it:
(replace <*> strings with actual desired values)
Code:
sed -i -e '/^DROPBEAR_PORT=/s/=.*/=<YOUR_PORT>/' -e '/^DROPBEAR_PASSWORD=/s/=.*/=<YOUR_PASSWORD>/' -e '/^DROPBEAR_ENABLE=/s/=.*/=yes/' /opt/etc/default/dropbear
/opt/etc/init.d/S51dropbear start
Now you are advised to use dropbear as SSH server to play with Optware-ng: use 'root' user, '<YOUR_PASSWORD>' password and '<YOUR_PORT>' port
For better security you may use public key authorization only: set password to blank and add your public keys to /opt/etc/dropbear/authorized_keys (don't forget to `chmod 600 /opt/etc/dropbear/authorized_keys` after you create it!) and restart dropbear or just reboot.
P.S. I'm not exactly sure that this is the right place to post this, please move it if needed.