Is there anyone working on it? Its really worth a shot. Even for the Aroma installer.
Özgürce said:
Is there anyone working on it? Its really worth a shot. Even for the Aroma installer.
Click to expand...
Click to collapse
Blefish is porting touch recovery, he tweeted that he will be releasing it with CM9 0.03 in mid July.
Yea, its working well, but its missing the atmel support again (...). I will tweet as soon as I get it properly working on both touch panels.
Sent from my U8800 using Tapatalk 2
Can you release it? At atmel will work with hardware buttons until you fix this..
Sent from my U8800
Why release it since the touch wont work for Atmel users, so no TOUCH recovery.
AceDroidX said:
Why release it since the touch wont work for Atmel users, so no TOUCH recovery.
Click to expand...
Click to collapse
Yes, but Blefish could release a version for those with synaptics... I think it wouldn't hurt
Sent from my U8800
It will be only for U8800 (not for pro) I think??
fjsferreira said:
Yes, but Blefish could release a version for those with synaptics... I think it wouldn't hurt
Sent from my U8800
Click to expand...
Click to collapse
Yes, and we could act as beta testers, so if there is some bug it could be fixed on next, atmel support version.
Blefish said:
Yea, its working well, but its missing the atmel support again (...). I will tweet as soon as I get it properly working on both touch panels.
Sent from my U8800 using Tapatalk 2
Click to expand...
Click to collapse
Thats great! Glad to hear someone working on it. I'm using 4EXT Touch recovery on my Incredible S. Its awesome.
Blefish said:
Yea, its working well, but its missing the atmel support again (...). I will tweet as soon as I get it properly working on both touch panels.
Sent from my U8800 using Tapatalk 2
Click to expand...
Click to collapse
Will it support Universal Flasher Tool for theming?
With your CyanogemMOD ROM that will be a must have!!!
For the moment it is only supported by 5.0.2.7 CWM...
sr21 said:
Will it support Universal Flasher Tool for theming?
With your CyanogemMOD ROM that will be a must have!!!
For the moment it is only supported by 5.0.2.7 CWM...
Click to expand...
Click to collapse
Can you get me the log? Try to flash it and after that go to advanced options, you should find it there.
About recovery - I'll cook it up, it will not have "offmode" charging as it's not handled by recovery nowadays. And of course, no Atmel support just yet.
Blefish said:
Can you get me the log? Try to flash it and after that go to advanced options, you should find it there.
About recovery - I'll cook it up, it will not have "offmode" charging as it's not handled by recovery nowadays. And of course, no Atmel support just yet.
Click to expand...
Click to collapse
LOG:
Code:
failed to open /sys/class/android_usb_/android0/state: No such file or directory
Universal Flasher Tool 3.6
sr21 said:
LOG:
Code:
failed to open /sys/class/android_usb_/android0/state: No such file or directory
Universal Flasher Tool 3.6
Click to expand...
Click to collapse
That error is common in 2.6.35 kernel with CWM 5.5.0.4. I'd need the whole log to help you. Or, you can send me the updater-script that should be located at zip-file/META-INF/com/google/android.
Blefish said:
That error is common in 2.6.35 kernel with CWM 5.5.0.4. I'd need the whole log to help you. Or, you can send me the updater-script that should be located at zip-file/META-INF/com/google/android.
Click to expand...
Click to collapse
You can see the script in the Universal Flasher Tool link that I provided before. The zip is a template.
It uses a script to do the modding in the recovery.
You can also check one of my flashable zips that I use in my TouchWiz MOD/ADDON PACK: Touchwiz_for_u8800_u8800pro_v4.1.0.1u1_signed.zip
You need to check the /META-INF/com/google/android/, the /tools/, /MORPH/ (themed apps goes here) and the MOD.config file.
I think the script fails here (/tools/run.sh):
Code:
################### MORPHING ##################
UI_PRINT " "; LOG="MORPHING >>"; LOGS "$LOG"; UI_PRINT "$LOG"
CHECK2=0
x=1
until [ $x = 0 ]; do
if [ -d $PATHDATA ];then
WORK=$PATHDATA
SYSTEM="/data/app"
elif [ ! -d $PATHDATA ] && [ -d $PATHFRAM ];then
WORK=$PATHFRAM
SYSTEM="/system/framework"
elif [ ! -d $PATHDATA ] && [ ! -d $PATHFRAM ] && [ -d $PATHAPP ]; then
WORK=$PATHAPP
SYSTEM="/system/app"
elif [ ! -d $PATHDATA ] && [ ! -d $PATHFRAM ] && [ ! -d $PATHAPP ]; then
x=0
fi
if [ $x = 1 ]; then
for f in $(ls $WORK); do
if [ -e $SYSTEM/$f ];then
if [ `/cache/tools/tar -tPf $RESTORE/backup.tar $SYSTEM/$f | wc -l` = 0 ]; then
/cache/tools/tar -prPf $RESTORE/backup.tar $SYSTEM/$f
fi
mkdir -p /$APPLY
f2="`echo $f | cut -d "." -f 1`.zip"
mv $SYSTEM/$f /$APPLY/$f2
#FIX -V4 SUFFIXES IN FOLDERS
if [ $V4MORPHING = "yes" ] && [ -d $WORK/$f/res ];then
FILES=`/system/xbin/7z l $APPLY/$f2 | awk '{print $6}'`
cd $WORK/$f/res
find * -type d | while read i;do
if [ `echo $FILES | grep $i-v4 | wc -l` != 0 ]; then
mv $WORK/$f/res/$i $WORK/$f/res/$i-v4
fi
done
fi
#CYANOGENMOD vs STOCK BASED ROM
if [ $MULTIPLATTFORM = "yes" ];then
cd $WORK/$f
find * -type f | while read i;do
if [ $CYANO = "yes" ] && [ `basename $i | cut -d "#" -f 1` = "CMOD" ];then
mv $WORK/$f/$i $WORK/$f/`dirname $i`/`basename $i | cut -d "#" -f 2`
elif [ $CYANO = "no" ] && [ `basename $i | cut -d "#" -f 1` = "CMOD" ];then
rm $i
fi
done
fi
#MORPH, ZIP & ZIPALIGN
if [ $CLEANMORPHING = "yes" ];then
MORPH=`/system/xbin/7z a -ur0x2y2z2w2 $APPLY/$f2 $WORK/$f/* | grep -o -E "Everything is Ok" | wc -l`
else
MORPH=`/system/xbin/7z a $APPLY/$f2 $WORK/$f/* | grep -o -E "Everything is Ok" | wc -l`
fi
/cache/tools/zipalign -f 4 $APPLY/$f2 $SYSTEM/$f
rm -Rf $APPLY $WORK/$f
chown 0.0 $SYSTEM/$f && chmod 644 $SYSTEM/$f
if [ ! -e $SYSTEM/$f ] || [ $MORPH = 0 ]; then
/cache/tools/tar -pxPf $RESTORE/backup.tar $SYSTEM/$f
LOG="[X] Error with $f!"; LOGS "$LOG"; UI_PRINT "$LOG"
LOG="[<] Restored original $f"; LOGS "$LOG"; UI_PRINT "$LOG"
let CHECK2=$CHECK2-1
else
LOGS "[v] $SYSTEM/$f morphed"; UI_PRINT "[v] $f morphed"
let CHECK2=$CHECK2+2
fi
else
LOG="[!] $f not found, ignoring"; LOGS "$LOG"; UI_PRINT "$LOG"
fi
done
rm -R $WORK
fi
done
if [ $CHECK2 -le 0 ];then
LOG="[!] Nothing to morph"; LOGS "$LOG"; UI_PRINT "$LOG"
fi
Related
Hey there
I just found out that robocik zipalign on boot code was as same as maxisma ones
robocik
Code:
#!/system/bin/sh
# Automatic ZipAlign by Wes Garner
# ZipAlign files in /data that have not been previously ZipAligned (using md5sum)
# Thanks to oknowton for the changes
# Changelog:
# 1.1 (12/1/09) Switched to zipalign -c 4 to check the apk instead of MD5 (oknowton)
# 1.0 (11/30/09) Original
LOG_FILE=/data/zipalign.log
if [ -e $LOG_FILE ]; then
rm $LOG_FILE;
fi;
[B]echo "Starting Automatic ZipAlign $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE;
for apk in /system/sd/app/*.apk ; do[/B]
zipalign -c 4 $apk;
ZIPCHECK=$?;
if [ $ZIPCHECK -eq 1 ]; then
echo ZipAligning $(basename $apk) | tee -a $LOG_FILE;
zipalign -f 4 $apk /cache/$(basename $apk);
if [ -e /cache/$(basename $apk) ]; then
cp -f -p /cache/$(basename $apk) $apk | tee -a $LOG_FILE;
rm /cache/$(basename $apk);
else
echo ZipAligning $(basename $apk) Failed | tee -a $LOG_FILE;
fi;
else
echo ZipAlign already completed on $apk | tee -a $LOG_FILE;
fi;
done;
echo "Automatic ZipAlign finished at $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE;
Maxisma
Code:
#!/system/bin/sh
echo "++++ ZIP ALIGNMENT PROCESS STARTING ++++"
LOG_FILE=/data/zipalign.log
if [ -e $LOG_FILE ]; then
rm $LOG_FILE;
fi;
[B]echo "Starting DC Automatic ZipAlign $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE;
for apk in /data/app/*.apk ; do[/B]
zipalign -c 4 $apk;
ZIPCHECK=$?;
if [ $ZIPCHECK -eq 1 ]; then
echo ZipAligning $(basename $apk) | tee -a $LOG_FILE;
zipalign -f 4 $apk /cache/$(basename $apk);
if [ -e /cache/$(basename $apk) ]; then
cp -f -p /cache/$(basename $apk) $apk | tee -a $LOG_FILE;
rm /cache/$(basename $apk);
else
echo ZipAligning $(basename $apk) Failed DC | tee -a $LOG_FILE;
fi;
else
echo DCZipAlign already completed on $apk | tee -a $LOG_FILE;
fi;
done;
echo "Automatic ZipAlign finished at $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE;
echo "++++ ZIP ALIGNMENT PROCESS FINISHED ++++"
I have bold the differences between this two codes
So are this two codes work the same? Does it need /system/bin/sh in order to run the command line? If I change the #!/system/bin/sh (the first line) to #!/system/xbin/bash,will it work too? If I have don't have the bash file in /system/xbin/ ,will it work too? Are bash and sh the same?
BTW,erasmux's boot OC pack also included a 09betterzipalign in it (he said it wasn't his)
Here is the code
Code:
#!/system/xbin/bash
LOG_FILE=/data/zipalign.log
ZIPALIGNDB=/data/zipalign.db
SYSTEM=$(mount|grep "/system "|awk '{ print $1 }')
function mountrw {
mount | grep "/system " | grep rw >/dev/null || mount -o remount,rw $SYSTEM /system
}
function mountro {
mount | grep "/system " | grep ro >/dev/null || mount -o remount,ro $SYSTEM /system
}
[ -e $LOG_FILE ] && rm $LOG_FILE
[ -f $ZIPALIGNDB ] || touch $ZIPALIGNDB
echo "Starting FV Automatic ZipAlign $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE
for DIR in /system/app /data/app /data/app-private ; do
cd $DIR
for APK in *.apk ; do
if [ $APK -ot $ZIPALIGNDB ] && [ $(grep "$DIR/$APK" $ZIPALIGNDB|wc -l) -gt 0 ] ; then
echo "Already checked: $DIR/$APK" | tee -a $LOG_FILE
else
zipalign -c 4 $APK
if [ $? -eq 0 ] ; then
echo "Already aligned: $DIR/$APK" | tee -a $LOG_FILE
grep "$DIR/$APK" $ZIPALIGNDB > /dev/null || echo $DIR/$APK >> $ZIPALIGNDB
else
echo "Now aligning: $DIR/$APK" | tee -a $LOG_FILE
zipalign -f 4 $APK /cache/$APK
mountrw
cp -f -p /cache/$APK $APK
rm -f /cache/$APK
grep "$DIR/$APK" $ZIPALIGNDB > /dev/null || echo $DIR/$APK >> $ZIPALIGNDB
fi
fi
done
done
mountro
touch $ZIPALIGNDB
echo "Automatic ZipAlign finished at $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE
the first line is #!/system/xbin/bash,so it needs the bash file in the /system/xbin folder in order to work,rite? Is it the same as robocik and maxisma code?
What is this?
make something clear!!
robocik's script looks for apks to zipalign at "/system/sd/app/"
while Maxisma's looks at "/data/app/"
When looking at the dirs, robably robocik's mounts things as well in another script. Maybe apps2sd?
The first long line is quite unimportant, it just states "hey I'm zipalign and ready to work", with different names/texts.
I believed bash was based on sh, can't tell for sure. I always learned to follow the sh guidelines to get max compability. Maybe some linux-expert can tell you for sure, or just try to google it a little
riemervdzee said:
robocik's script looks for apks to zipalign at "/system/sd/app/"
while Maxisma's looks at "/data/app/"
When looking at the dirs, robably robocik's mounts things as well in another script. Maybe apps2sd?
The first long line is quite unimportant, it just states "hey I'm zipalign and ready to work", with different names/texts.
I believed bash was based on sh, can't tell for sure. I always learned to follow the sh guidelines to get max compability. Maybe some linux-expert can tell you for sure, or just try to google it a little
Click to expand...
Click to collapse
After some hours of research,I found out most of the ROM in XDA all include sh file (I didn't check all of it but most of them included sh file) but not all included bash file (10 out of 4 rom included bash file),this means in order to run the code,I need bash file in xbin (did a adb logcat and found out a line that says busybox runparts - blah blah blah /system/etc/init.d/09betterzipalign [the one that has #!/system/xbin/bash line on it] error running something like that)
BTW,robocik and maxisma one are almost the same,how can robocik ones can zipalign /system/sd/app/,he didn't change the code or anything,just type in the log file,thats all...
One more thing,y can't we run zipalign-on-boot on all the apps that were installed through the Android Market or wasn't installed on the /data/app?
Ng LC said:
Hey there
I just found out that robocik zipalign on boot code was as same as maxisma ones
robocik
Code:
#!/system/bin/sh
# Automatic ZipAlign by Wes Garner
# ZipAlign files in /data that have not been previously ZipAligned (using md5sum)
# Thanks to oknowton for the changes
# Changelog:
# 1.1 (12/1/09) Switched to zipalign -c 4 to check the apk instead of MD5 (oknowton)
# 1.0 (11/30/09) Original
LOG_FILE=/data/zipalign.log
if [ -e $LOG_FILE ]; then
rm $LOG_FILE;
fi;
[B]echo "Starting Automatic ZipAlign $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE;
for apk in /system/sd/app/*.apk ; do[/B]
zipalign -c 4 $apk;
ZIPCHECK=$?;
if [ $ZIPCHECK -eq 1 ]; then
echo ZipAligning $(basename $apk) | tee -a $LOG_FILE;
zipalign -f 4 $apk /cache/$(basename $apk);
if [ -e /cache/$(basename $apk) ]; then
cp -f -p /cache/$(basename $apk) $apk | tee -a $LOG_FILE;
rm /cache/$(basename $apk);
else
echo ZipAligning $(basename $apk) Failed | tee -a $LOG_FILE;
fi;
else
echo ZipAlign already completed on $apk | tee -a $LOG_FILE;
fi;
done;
echo "Automatic ZipAlign finished at $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE;
Maxisma
Code:
#!/system/bin/sh
echo "++++ ZIP ALIGNMENT PROCESS STARTING ++++"
LOG_FILE=/data/zipalign.log
if [ -e $LOG_FILE ]; then
rm $LOG_FILE;
fi;
[B]echo "Starting DC Automatic ZipAlign $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE;
for apk in /data/app/*.apk ; do[/B]
zipalign -c 4 $apk;
ZIPCHECK=$?;
if [ $ZIPCHECK -eq 1 ]; then
echo ZipAligning $(basename $apk) | tee -a $LOG_FILE;
zipalign -f 4 $apk /cache/$(basename $apk);
if [ -e /cache/$(basename $apk) ]; then
cp -f -p /cache/$(basename $apk) $apk | tee -a $LOG_FILE;
rm /cache/$(basename $apk);
else
echo ZipAligning $(basename $apk) Failed DC | tee -a $LOG_FILE;
fi;
else
echo DCZipAlign already completed on $apk | tee -a $LOG_FILE;
fi;
done;
echo "Automatic ZipAlign finished at $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE;
echo "++++ ZIP ALIGNMENT PROCESS FINISHED ++++"
I have bold the differences between this two codes
So are this two codes work the same? Does it need /system/bin/sh in order to run the command line? If I change the #!/system/bin/sh (the first line) to #!/system/xbin/bash,will it work too? If I have don't have the bash file in /system/xbin/ ,will it work too? Are bash and sh the same?
BTW,erasmux's boot OC pack also included a 09betterzipalign in it (he said it wasn't his)
Here is the code
Code:
#!/system/xbin/bash
LOG_FILE=/data/zipalign.log
ZIPALIGNDB=/data/zipalign.db
SYSTEM=$(mount|grep "/system "|awk '{ print $1 }')
function mountrw {
mount | grep "/system " | grep rw >/dev/null || mount -o remount,rw $SYSTEM /system
}
function mountro {
mount | grep "/system " | grep ro >/dev/null || mount -o remount,ro $SYSTEM /system
}
[ -e $LOG_FILE ] && rm $LOG_FILE
[ -f $ZIPALIGNDB ] || touch $ZIPALIGNDB
echo "Starting FV Automatic ZipAlign $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE
for DIR in /system/app /data/app /data/app-private ; do
cd $DIR
for APK in *.apk ; do
if [ $APK -ot $ZIPALIGNDB ] && [ $(grep "$DIR/$APK" $ZIPALIGNDB|wc -l) -gt 0 ] ; then
echo "Already checked: $DIR/$APK" | tee -a $LOG_FILE
else
zipalign -c 4 $APK
if [ $? -eq 0 ] ; then
echo "Already aligned: $DIR/$APK" | tee -a $LOG_FILE
grep "$DIR/$APK" $ZIPALIGNDB > /dev/null || echo $DIR/$APK >> $ZIPALIGNDB
else
echo "Now aligning: $DIR/$APK" | tee -a $LOG_FILE
zipalign -f 4 $APK /cache/$APK
mountrw
cp -f -p /cache/$APK $APK
rm -f /cache/$APK
grep "$DIR/$APK" $ZIPALIGNDB > /dev/null || echo $DIR/$APK >> $ZIPALIGNDB
fi
fi
done
done
mountro
touch $ZIPALIGNDB
echo "Automatic ZipAlign finished at $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE
the first line is #!/system/xbin/bash,so it needs the bash file in the /system/xbin folder in order to work,rite? Is it the same as robocik and maxisma code?
Click to expand...
Click to collapse
Thanks mate, getting this error
I//system/xbin/busybox( 1215): /system/etc/init.d/97zipalign: line 24: tee: command not found
I//system/xbin/busybox( 1215): /system/etc/init.d/97zipalign: line 15: tee: command not found
I//system/xbin/busybox( 1215): /system/etc/init.d/97zipalign: line 16: basename: command not found
I//system/xbin/busybox( 1215): /system/etc/init.d/97zipalign: line 15: basename: command not found
Any idea?
Thanks to Chainfire for the original idea here, here comes the version for AROMA installers.
Purpose: Do "live" output from a shell script to the AROMA user interface in installation step.
How it works: The update-binary uses a pipe for accessing the UI of the recovery like writing a line of text or updating the progress-bar. AROMA does basically the same thing -- the main AROMA installer opens another pipe and forks itself for the actual installation, the child running the installation writes to the pipe of the parent AROMA. If you try Chainfire's script from above, it will obtain the pipe of the recovery UI and write to that instead of the AROMA UI, only causing some nasty screen flicker. Because AROMA forks only directly before starting the installation, it is a little trickier to get it right -- we have to wait for the child to show up in 'ps'.
Code:
OUTFD=$(ps | grep -v grep | grep -oE "aroma/update-binary(.*)" | cut -d " " -f 3)
if [ $OUTFD == "" ]; then
count=4
while [ $count -ge 0 ]; do
sleep 1
OUTFD=$(ps | grep -v grep | grep -oE "aroma/update-binary(.*)" | cut -d " " -f 3)
if [$OUTFD != ""]; then break; fi
count=$((count-1))
done
fi
progress() {
if [ $OUTFD != "" ]; then
echo "progress ${1} ${2} " 1>&$OUTFD
fi
}
set_progress() {
if [ $OUTFD != "" ]; then
echo "set_progress ${1} " 1>&$OUTFD
fi
}
ui_print() {
if [ $OUTFD != "" ]; then
echo "ui_print ${1} " 1>&$OUTFD
echo "ui_print " 1>&$OUTFD
else
echo "${1}"
fi
}
The script above provides the functions progress, set_progress and ui_print. Instead of putting it in every script, I suggest you place it alongside your installer shellscripts, name it ui_functions.sh and source it like this:
Code:
. ./ui_functions.sh
This is a thirteen step program for flashaholics.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Since there is no cure for flashaholism, we may as well give those afflicted more to flash..
**ALWAYS FLASH AT YOUR OWN RISK ANYTHING THAT GETS POSTED HERE**
Just follow these simple steps:
1. Rate this thread 5 stars
2. Subscribe to this thread
3. Tell other flashaholics to join this thread
4. Treat all flashaholics with respect
5. Be on the constant lookout for anything new and noteworthy
6. Be helpful to those afflicted by posting these new found links
7. Always use protection when flashing (have a backup)
8. Don't be discrete about your flashing adventures, share your steamy details
9. Be helpful to outsiders that aren't as flash savvy as you and answer their posts nicely
10. If you feel a member is on the wagon, help them fall off by bragging about how cool your phone is
11. Remember to follow XDA rules
12. Happy flashing!!
13. Always thank your developers, and donate if you can..
BECOME PART OF AN ADDICTIVE COMMUNITY
I'm on telegram
HELP THE COMMUNITY AND JOIN THE ROM "WIKI"
You can add your knowledge to this growing chart of roms
-JOIN HERE-
When not flashing I will update the thread with notable links of what, where, and how to flash..
Contributors
@#sychrome#
XDA community
Get your support banners -HERE-
WE'RE HERE FOR YOUR TUNING NEEDS
KA MOD (Kernel aduitor)
http://forum.xda-developers.com/android/apps-games/kernel-adiutor-mod-singularity-kernel-t3333549
How to apply profiles
http://forum.xda-developers.com/oneplus-one/development/rom-cm-12-builds-t3045053/post68636831
Lightning Kernel profiles
http://forum.xda-developers.com/oneplus-one/general/flshholic-help-thread-t2869514/post69351130
New Kernel profiles (jgcaap rom)
http://forum.xda-developers.com/oneplus-one/general/flshholic-help-thread-t2869514/post69271814
Moriarty Kernel profiles (S.O.S. rom)
http://forum.xda-developers.com/showpost.php?p=70181339&postcount=175
Battery Savings tips
1. Keep unneeded services off (location, BT, NFC, ect..)
2. Lower the screen brightness
3. Manage your apps with greenify (many apps will abuse services if you let them)
4. Don't discharge the battery to zero, and try to keep it cool (hot batteries discharge faster)
Settings Script
WELCOME TO SETTINGS SCRIPT
This is a set scripts I started collecting and working on since my days of old using a Nexus S. It has been updated and tested 100's of times and is ready for use on the OnePlus. I am not going to claim 1000's of points gained in benchmarks, or days of battery life, but it should help balance performance and battery..
Basically it's a collection of init.d scripts to gently modify some services, system, battery and various functions. This is active at boot (assuming you have init.d support and busybox). Please don't use this with other scripts (seeder is okay). Don't operate while intoxicated or holding an iPhone..
Code:
#!/system/bin/sh
# test
if [ -f /data/Test.log ] ; then
rm /data/Test.log
fi
echo "Script is working !!!" >> /data/Test.log
echo "excecuted on $(date +"%d-%m-%Y %r" )" >> /data/Test.log
# Expand Kernel Permission
if [ -e /dev/cpuctl/apps/cpu.notify_on_migrate ]; then
chown system.system /dev/cpuctl/apps/cpu.notify_on_migrate
chmod 0666 /dev/cpuctl/apps/cpu.notify_on_migrate
fi
# Cleaner
#Interval between runs, in seconds, 172800=48 hours
RUN_EVERY=172800
busybox rm -f /data/anr/*.*
busybox rm -f /data/cache/*.*
busybox rm -f /data/log/*.*
busybox rm -f /data/local/tmp/*.*
busybox rm -f /data/mlog/*
busybox rm -f /data/tombstones/*
busybox rm -f /data/backup/pending/*
busybox rm -f /data/system/dropbox/*
busybox rm -f /cache/recovery/*
busybox rm -f /dev/log/main/*
chmod 700 /data/system/dropbox
busybox chmod 700 /data/system/usagestats
# Zipalign
# 86400=24 hours
RUN_EVERY=86400
LOG_FILE=/data/zipalign.log
ZIPALIGNDB=/data/zipalign.db
if [ -e $LOG_FILE ]; then
rm $LOG_FILE;
fi;
if [ ! -f $ZIPALIGNDB ]; then
touch $ZIPALIGNDB;
fi;
echo "Starting FV Automatic ZipAlign $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE
for DIR in /system/app /data/app ; do
cd $DIR
for APK in *.apk ; do
if [ $APK -ot $ZIPALIGNDB ] && [ $(grep "$DIR/$APK" $ZIPALIGNDB|wc -l) -gt 0 ] ; then
echo "Already checked: $DIR/$APK" | tee -a $LOG_FILE
else
zipalign -c 4 $APK
if [ $? -eq 0 ] ; then
echo "Already aligned: $DIR/$APK" | tee -a $LOG_FILE
grep "$DIR/$APK" $ZIPALIGNDB > /dev/null || echo $DIR/$APK >> $ZIPALIGNDB
else
echo "Now aligning: $DIR/$APK" | tee -a $LOG_FILE
zipalign -f 4 $APK /cache/$APK
cp -f -p /cache/$APK $APK
busybox rm -f /cache/$APK
grep "$DIR/$APK" $ZIPALIGNDB > /dev/null || echo $DIR/$APK >> $ZIPALIGNDB
fi
fi
done;
done;
touch $ZIPALIGNDB
echo "Automatic ZipAlign finished at $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE
# Renice
B=/system/xbin/busybox
( while true
do
sf=$( service list | $B grep -c "SurfaceFlinger" )
if [ $sf -eq 1 ]
then
service call SurfaceFlinger 1008 i32 1
break
else
sleep 2
fi
done
) &
# Kernel Tweaks
if [ -e /proc/sys/kernel/softlockup_panic ]
then
echo 0 > /proc/sys/kernel/softlockup_panic
fi
if [ -e /proc/sys/kernel/hung_task_timeout_secs ]
then
echo 0 > /proc/sys/kernel/hung_task_timeout_secs
fi
if [ -e /proc/sys/kernel/panic_on_oops ]
then
echo 0 > /proc/sys/kernel/panic_on_oops
fi
if [ -e /proc/sys/kernel/panic ]
then
echo 0 > /proc/sys/kernel/panic
fi
if [ -e /proc/sys/kernel/msgmni ]
then
echo 2048 > /proc/sys/kernel/msgmni
fi
if [ -e /proc/sys/kernel/msgmax ]
then
echo 64000 > /proc/sys/kernel/msgmax
fi
if [ -e /proc/sys/kernel/shmmax ]
then
echo 268435500 > /proc/sys/kernel/shmmax
fi
if [ -e /proc/sys/kernel/threads-max ]
then
echo 525810 > /proc/sys/kernel/threads-max
fi
if [ -e /proc/sys/kernel/nmi_watchdog ]; then
echo "0" > /proc/sys/kernel/nmi_watchdog;
sysctl -e -w kernel.nmi_watchdog=0;
fi;
if [ -e /proc/sys/vm/drop_caches ]; then
echo "3" > /proc/sys/vm/drop_caches;
sysctl -e -w vm.drop_caches=3;
fi;
#fsync
if [ -e /sys/devices/virtual/misc/fsynccontrol/fsync_enabled ]; then
echo "0" > /sys/devices/virtual/misc/fsynccontrol/fsync_enabled;
fi;
if [ -e /sys/class/misc/fsynccontrol/fsync_enabled ]; then
echo "0" > /sys/class/misc/fsynccontrol/fsync_enabled;
fi;
if [ -e /sys/module/sync/parameters/fsync ]; then
echo "0" > /sys/module/sync/parameters/fsync;
fi;
if [ -e /sys/module/sync/parameters/fsync_enabled ]; then
echo "0" > /sys/module/sync/parameters/fsync_enabled;
echo "N" > /sys/module/sync/parameters/fsync_enabled;
fi;
# Disable Sleepers
echo "NO_NEW_FAIR_SLEEPERS" > /sys/kernel/debug/sched_features;
echo "NO_NORMALIZED_SLEEPER" > /sys/kernel/debug/sched_features;
# Kill Media Tweak
LOG=/data/mediaserver_log.txt;
supolicy --live "allow mediaserver mediaserver_tmpfs:file { read write execute };";
if [ "$SDK" -le "18" ]; then
if [ "$SDK" -gt "10" ]; then
echo "Mediaserver kill" >> $LOG;
busybox killall -9 android.process.media;
busybox killall -9 mediaserver;
fi;
fi;
# Vsync tweak
if [ -e /sys/kernel/debug/msm_fb/0/vsync_enable ]; then
echo 0 > /sys/kernel/debug/msm_fb/0/vsync_enable
fi;
#Sqlite
# Log file location
LOG_FILE=/data/sqlite.log
#Interval between SQLite3 runs, in seconds, 604800=1 week
RUN_EVERY=604800
# Get the last modify date of the Log file, if the file does not exist, set value to 0
if [ -e $LOG_FILE ]; then
LASTRUN=`stat -t $LOG_FILE | awk '{print $14}'`
else
LASTRUN=0
fi;
# Get current date in epoch format
CURRDATE=`date +%s`
# Check the interval
INTERVAL=$(expr $CURRDATE - $LASTRUN)
# If interval is more than the set one, then run the main script
if [ $INTERVAL -gt $RUN_EVERY ]; then
if [ -e $LOG_FILE ]; then
rm $LOG_FILE;
fi;
echo "SQLite database VACUUM and REINDEX started at $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE;
for i in `busybox find /d* -iname "*.db"`;
do /system/xbin/sqlite3 $i 'VACUUM;';
resVac=$?
if [ $resVac == 0 ]; then
resVac="SUCCESS";
else
resVac="ERRCODE-$resVac";
fi;
/system/xbin/sqlite3 $i 'REINDEX;';
resIndex=$?
if [ $resIndex == 0 ]; then
resIndex="SUCCESS";
else
resIndex="ERRCODE-$resIndex";
fi;
echo "Database $i: VACUUM=$resVac REINDEX=$resIndex" | tee -a $LOG_FILE;
done
echo "SQLite database VACUUM and REINDEX finished at $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE;
fi;
#Lcd power
if [ -e /sys/class/lcd/panel/power_reduce ]; then
echo "LCD power reduce detected. Activating..";
echo "1" > /sys/class/lcd/panel/power_reduce;
fi;
# Properties tweak
setprop ro.kernel.android.checkjni 0
setprop debug.kill_allocating_task 0
setprop dev.pm.dyn_samplingrate 1
setprop pm.sleep_mode 1
setprop persist.sys.purgeable_assets 1
setprop persist.cust.tel.eons 1
setprop ro.ril.enable.amr.wideband 1
setprop ro.ril.transmitpower true
setprop ro.ril.sensor.sleep.control 1
setprop ro.config.combined_signal true
setprop ro.ril.hep 1
setprop wifi.supplicant_scan_interval 300
setprop cm.filesystem.ready 1
setprop persist.service.pcsync.enable 0
setprop persist.service.lgospd.enable 0
setprop ro.min_pointer_dur 1
setprop ro.sys.fw.bg_apps_limit 6
setprop ro.lcd_min_brightness 1
setprop persist.sys.use_dithering 0
setprop persist.sys.use_16bpp_alpha 1
setprop ro.max.fling_velocity 20000
setprop ro.min.fling_velocity 10000
#Ext4 mount
# Log file location
LOG_FILE=/data/fsck.log
if ( mount | grep -w ext4 ) then
echo "EXT4 Partition Found!"
echo "Remounting..."
mount -o noatime,remount,rw,discard,barrier=0,commit=60,noauto_da_alloc,delalloc /cache /cache;
mount -o noatime,remount,rw,discard,barrier=0,commit=60,noauto_da_alloc,delalloc /data /data;
mount >> /data/fsck.log;
else
echo "EXT4 Partition Not Found!"
fi;
echo "Script finished"
FLASH AT YOUR OWN RISK
INSTALLATION:
**Requires BusyBox and init.d support**
(For some Nougat roms emulation of init.d may be nessesary, use KA mod, or another app for init.d emulation..)
Just flash in recovery, no extra steps required to enjoy..
It removes the old version, so flash and forget, it also survives a dirty flash (v5.5+)..
This has been tested, but no guarantees for protection from aliens or ninjas..
SPECIAL THANKS TO: @h-cspu @7u5h4r @Stone_88@ashutoshmn @Purerawenergy and @maxed4901 for helping me improve it..
Unless there's a bug fix or something I like, this won't get updated further.. NO ETAS
DOWNLOAD(s)
https://www.androidfilehost.com/?w=files&flid=123565
SCRIPTS & UNINSTALLER
LATEST UPDATE
VERSION: 6.1 SS Beta 08/04/2017
VERSION: 3.1 SS Stable 08/04/2017
Enjoy
Mine
CARBON
DOWNLOAD
Normal ext4 Debloated, with Android L keyboard and MiXplorer
Converted F2FS Converted, debloated, with Android L keyboard and MiXplorer.. THIS DOES NOT NEED A KERNEL FLASHED OVER THIS it is an "all in one" convert and is complete..
Original from Moonlight Original with extra Chinese apps
Not mine
yeeeaaaaaa
Sent from my 1+1
Thank you so much for bringing us carbon!
For the spreadsheet, it requires access. Don't forget to change the permissions
You need permission
Want in? Ask the owner for access, or switch to an account with permission. Learn more
Click to expand...
Click to collapse
zephiK said:
For the spreadsheet, it requires access. Don't forget to change the permissions
Click to expand...
Click to collapse
I'll get that fixed, its a work in progress..
Sent from my One using XDA Premium 4 mobile app
My name is ninjanurse, and I am a [email protected]@holic
Sent from my One A0001 using Tapatalk
welcome, ninjanurse
Sent from my 1+1
ninjanurse said:
My name is ninjanurse, and I am a [email protected]@holic
Sent from my One A0001 using Tapatalk
Click to expand...
Click to collapse
I think you need to tell the group about your latest flashing exploits, and don't forget to brag..
Sent from my One using XDA Premium 4 mobile app
Hello i am primo14z
and i can't stand to have one ROM to much time :/
so ya they say that first step is to face yourself with the problem , so I am a [email protected]@holic
i tryed Carbon ROM and i must say works great, but doesn't have that special something why would i make it my daily
I'm a [email protected]@holic as well, dansou901 is my name. My method of getting along is having multirom installed, it helps alot with all the flashing...
dansou901 said:
I'm a [email protected]@holic as well, dansou901 is my name. My method of getting along is having multirom installed, it helps alot with all the flashing...
Click to expand...
Click to collapse
I wonder if multirom works on f2fs?..
**using that search thingy, it turns out that multirom does indeed support f2fs..
Sent from my One using XDA Premium 4 mobile app
Setting.Out said:
I wonder if multirom works on f2fs?..
**using that search thingy, it turns out that multirom does indeed support f2fs..
MultiROM really helps me to stay a real [email protected]@holic, why choose a rom of choice.. I can have them all...
Click to expand...
Click to collapse
ninjanurse said:
Setting.Out said:
I wonder if multirom works on f2fs?..
**using that search thingy, it turns out that multirom does indeed support f2fs..
MultiROM really helps me to stay a real [email protected]@holic, why choose a rom of choice.. I can have them all...
Click to expand...
Click to collapse
As long as you don't run out of storage space...
Click to expand...
Click to collapse
ninjanurse said:
As long as you don't run out of storage space...
Click to expand...
Click to collapse
Binge and purge!!..
Sent from my A0001 using XDA Premium 4 mobile app
I just moved back to ext4 from f2fs.. For a Flashaholic that was a long time to be limited in how and when you can flash.. I was going through withdrawls, so I flashed 4 roms 3 recoveries and 1 kernel along with gapps and the lot as well.. AHHHH... Much better.. And honestly, I know that f2fs is supposed to be faster, but even if it is, I want a bit more freedom to flash.. I'm not saying I won't try it again, but not for a while..
I will have some updated links to websites/roms this week as well as more than just a shell of a chart.. I think the chart(s) will really help others see what a rom has to offer..
Hello everyone!
I have had to set up quite a few of these sticks, so I wanted to start a little development tool to automate the process.
This is just a stupid bash script but it will make your TV usable without ads by installing Launcher Hijack 3 and configuring it for you and X43Stream. If anyone has requests I will work on this further. Leanback will not work, someone needs to mod it.
Source
PHP:
echo "Please ensure you are already connected and adb is installed correctly."
sleep 1
echo "Installing Launcher Hijack 3 (LH3).."
adb install "LauncherHijack3.apk"
echo "Installing TV Launcher.."
adb install "TVLauncher.apk"
echo "Installing XFinity Stream latest July 2017.."
adb install "X43Stream.apk"
echo "Opening LH3.."
adb shell am start -n com.baronkiko.launcherhijack/.MainActivity
sleep 3
echo "Selecting new launcher.."
adb shell input keyevent 23
sleep 1
adb shell input keyevent 23
sleep 1
adb shell am start -n com.awe.dev.pro.tv/.Launcher
echo "Enjoy, try out the home button!"
echo "It may not work every time, press again, work in progress :)"
or download it:
https://www.sendspace.com/file/epob8z
Thank you so much, I can't root my fire TV and I'm sick and tired of the Amazon launcher. I will be setting it up tomorrow. Will post back with results
Nvmd, finally got it.
This can be ran as a straight native Windows batch without having to install Bash support. Replace "sleep 1" with "timeout -t 1"
(or you can just paste ^^ into a properly connected ADB console with apks in the right places, will fail on "sleep 1" but it worked for me)
EDIT: Also works fine with Tvlauncher 2 rename the apk to tvlauncher like in the package and thanks OP! Home button seems to work fine for me!
installation help
Please help me install this fire tv setup tool i have a newer fire tv and dont know what to do with the download. i am not a pro but can follow directions and i hate the fire tv launcher.
Please help
Thank You
1. open a command prompt to the directory that contains ADB and put everything from the download in the same folder.
2. in the console window "adb connect xxx.xxx.xxx.xxx" where the x's are your IP of your FireTV\Stick (no quotes)
3. cut\paste the script from above into the console (cmd) window and run it...
4. it will error on "sleep 1" but continue and finish fine. If you want to correct the script for Windows batch scripting, replace "sleep 1" with "timeout -t 1" and save it as a .bat file.
I don't understand why this was only posted as a bash script (it is the best non-root hack there is). Windows doesn't support bash out of the box, and 99 percent of the people who download the script wont know what to do with it. BTW this works, and even works with other launchers. I use Tv launcher 2 which supports (its own special) widgets. No root. Never see the amazon launcher. Block updates, and do it asap.
EDIT: Fire Stick 2 fyi
So do we need to use the tvlauncher apk for the xfinity app to work?
What is the tv launcher? Same UI as the newer aftv ui (-ads?)
Only reason I don't just jump in and test it is Im not 100%sure how to undo it. Just uninstall the apks?
Thanks
UPDATE-I just went for it and it works....sort of.
It immediately launches the new UI but after setting it up, when I hit the home button it just returns to the normal AFTV launcher.
***This is actually preferable to me since all I really wanted was the Xfinity stream app to work. I tried just extracting the apk and installing it on my other Fire TV but it said incompatible.
First I would like to say thank you for a great tool to use on non rooted devices, I love it.
One thing i noticed is, that most people still won't know what to do with this tool so i will try and help explain better
-download adb and install it, if you haven't already
-download the file OP has at top of post
-extract the zip file
-copy and paste the code at top of OP into NOTEPAD
-change every spot that says "Sleep 1", erase that and copy and paste this there instead "timeout -t 1
-click file at the top left in notepad and click save as name it FireTV.bat
-goto your adb folder of install, usually C:\Program Files (x86)
-erase the "sh file" in the file you downloaded and extracted from the OP earlier
-put the new FireTV.bat you just made in that folder you just erased the "sh file" from
-now put all of those files into the adb folder you just opened and found,"launcher hijack apk, TVLauncher apk, x43Stream apk and your FireTV.bat files."
-hold on shift and right click with your mouse to open and command promnt here, if that doesn't show powershell works as well, it depends on your windows version.
-type "adb connect 192.168.1.8 or whatever you ip is for your FIreTV, this is found by going to settings, device, about and scroll down to network and it will list your IP
-if right it will say connected to device
-now simply left click hold and drag the FireTV.bat file you just created into the command promt and press enter
-that is it should work just fine.
I usually don't do this so I hope I helped a little bit.
Ok, just tried this, works pretty flawless. Sometimes you have to press home a couple times to get it to work(but that's no big deal). One thing i did notice though, if you have appstarter/firestarter (forget its name) it launches it instead, simple fix is to uninstall it then run the .bat again.
Does this work on firestick as well? Would hate to mess something up lol.
Edit.
For anyone wondering, no this does not work on firestick, it will install the apps but thats it.
TimmyP said:
This can be ran as a straight native Windows batch without having to install Bash support. Replace "sleep 1" with "timeout -t 1"
(or you can just paste ^^ into a properly connected ADB console with apks in the right places, will fail on "sleep 1" but it worked for me)
EDIT: Also works fine with Tvlauncher 2 rename the apk to tvlauncher like in the package and thanks OP! Home button seems to work fine for me!
Click to expand...
Click to collapse
Do you have a safe download link for the Tvlauncher 2 apk? Also so all I do is change Tvlauncher in the script to Tvlauncher2 and replace the apk in the download file?
Would it be possible to add a app killer similar to firestarter when you press the menu key, even if just to launch system default app manager? If it had that i think it'd be perfect.
Can anyone add screenshots or video of what this looks like when completed?
enigma7820 said:
First I would like to say thank you for a great tool to use on non rooted devices, I love it.
One thing i noticed is, that most people still won't know what to do with this tool so i will try and help explain better
-download adb and install it, if you haven't already
-download the file OP has at top of post
-extract the zip file
-copy and paste the code at top of OP into NOTEPAD
-change every spot that says "Sleep 1", erase that and copy and paste this there instead "timeout -t 1
-click file at the top left in notepad and click save as name it FireTV.bat
-goto your adb folder of install, usually C:\Program Files (x86)
-erase the "sh file" in the file you downloaded and extracted from the OP earlier
-put the new FireTV.bat you just made in that folder you just erased the "sh file" from
-now put all of those files into the adb folder you just opened and found,"launcher hijack apk, TVLauncher apk, x43Stream apk and your FireTV.bat files."
-hold on shift and right click with your mouse to open and command promnt here, if that doesn't show powershell works as well, it depends on your windows version.
-type "adb connect 192.168.1.8 or whatever you ip is for your FIreTV, this is found by going to settings, device, about and scroll down to network and it will list your IP
-if right it will say connected to device
-now simply left click hold and drag the FireTV.bat file you just created into the command promt and press enter
-that is it should work just fine.
I usually don't do this so I hope I helped a little bit.
Click to expand...
Click to collapse
Very helpful but I had to correct a few lines:
-There was a "Sleep 3" I had to change to "timeout -t 3"
-In powershell I had to type ".\adb connect 192.168.xx.xxx" to get it to work.
-The left click hold and drag the FireTV.bat file didn't do anything so I just typed "FireTV.bat" on the command prompt and it ran.
Thanks for your help.
nyln said:
Hello everyone!
I have had to set up quite a few of these sticks, so I wanted to start a little development tool to automate the process.
This is just a stupid bash script but it will make your TV usable without ads by installing Launcher Hijack 3 and configuring it for you and X43Stream. If anyone has requests I will work on this further. Leanback will not work, someone needs to mod it.
Source
PHP:
echo "Please ensure you are already connected and adb is installed correctly."
sleep 1
echo "Installing Launcher Hijack 3 (LH3).."
adb install "LauncherHijack3.apk"
echo "Installing TV Launcher.."
adb install "TVLauncher.apk"
echo "Installing XFinity Stream latest July 2017.."
adb install "X43Stream.apk"
echo "Opening LH3.."
adb shell am start -n com.baronkiko.launcherhijack/.MainActivity
sleep 3
echo "Selecting new launcher.."
adb shell input keyevent 23
sleep 1
adb shell input keyevent 23
sleep 1
adb shell am start -n com.awe.dev.pro.tv/.Launcher
echo "Enjoy, try out the home button!"
echo "It may not work every time, press again, work in progress :)"
or download it:
https://www.sendspace.com/file/epob8z
Click to expand...
Click to collapse
The sendspace link is very slow,
Here is a direct download link: https://ipfs.works/ipfs/QmXnYYH5iSnsa4DQdQED8RapgM4pA7v6EV3bzfGdoR9sMp/Amazon_Fire_TV_Setup_Tool.zip
md5sum: 8847a2b99afee549e2f5f973d86bfa51
Thread cleaned. XDA-Developers is a site for all, including those whose main languages and experience levels may vary.
If you're unwilling or unable to treat people with the civility we all deserve, kindly consider a break away from the keyboard.
Thank you all for your cooperation.
Sorry Somehow my post posted twice! not sure how to delete it so i'm editing this one
nyln said:
Hello everyone!
I have had to set up quite a few of these sticks, so I wanted to start a little development tool to automate the process.
This is just a stupid bash script but it will make your TV usable without ads by installing Launcher Hijack 3 and configuring it for you and X43Stream. If anyone has requests I will work on this further. Leanback will not work, someone needs to mod it.
Source
PHP:
echo "Please ensure you are already connected and adb is installed correctly."
sleep 1
echo "Installing Launcher Hijack 3 (LH3).."
adb install "LauncherHijack3.apk"
echo "Installing TV Launcher.."
adb install "TVLauncher.apk"
echo "Installing XFinity Stream latest July 2017.."
adb install "X43Stream.apk"
echo "Opening LH3.."
adb shell am start -n com.baronkiko.launcherhijack/.MainActivity
sleep 3
echo "Selecting new launcher.."
adb shell input keyevent 23
sleep 1
adb shell input keyevent 23
sleep 1
adb shell am start -n com.awe.dev.pro.tv/.Launcher
echo "Enjoy, try out the home button!"
echo "It may not work every time, press again, work in progress :)"
or download it:
https://www.sendspace.com/file/epob8z
Click to expand...
Click to collapse
I'm assuming this is using adb tcpip? I have a very Epic setup of bash scripts for setting up Fire Devices. I made it for my brother.
Anyways here is the chunk of code will grab your current connected networks and provide a list to choose from. Example if you have to it would show: 192.168.0.1 & 10.0.0.1 . When you choose one it will scan your network for Fire Devices with port 5555 open and present you with a list of found devices. You can choose to connect to a specific one or connect to them all.
There is a lot of extra code in this that needs to be removed. Right now i dont have the time to clean it up so hopefully you can! Also this chunk of code requires nmap to be installed. FYI This runs on Kali Linux but should work on other distro's but you may have to account for sudo usage.
Code:
function NetworkScan() {
function GetNetworks() {
echo -e "\n\n"
cd $(grep 'MainPath=' $HOME/.][NT3L][ST][CKS/main.conf | cut -d'=' -f2 | sed -e "s:/$::g") &>/dev/null
TotalConnectedDevices="$(adb devices 2>/dev/null | grep -v "List" | grep -v "^$" | grep -iv "daemon" | sort | uniq | wc -l)"
ConnectedDevices="$(adb devices 2>/dev/null | grep -v "List" | grep -v "^$" | grep -iv "daemon" | grep -iv "offline" | sort | uniq | wc -l)"
ConnectedOffline="$(adb devices 2>/dev/null | grep -v "List" | grep -v "^$" | grep -iv "daemon" | grep -i "offline" | sort | uniq | wc -l)"
prompt="$(echo -e "\e[96m][NT3L][G3NC][ NetworkPicker Menu:\e[0m")"
IP=$(for file in $(ifconfig | egrep -o "wlan.:|eth.:" | cut -d" " -f1 | sed -e "s/://g"); do ip addr show $file | grep -w inet | cut -d"/" -f1 |sed -e 's/\<inet\>//g' -e 's/^[ \t]*//' | grep "[1-9][0-9]" | cut -d'.' -f1,2,3; done | sort | uniq)
options=( $(for file in $(echo "$IP"); do echo "$file.1/24"; done | sort | uniq | xargs -0) )
echo -e " $prompt $TotalConnectedDevices "
echo -e " [\e[96m$ConnectedOffline\e[0m]----------------------------------[\e[96m$ConnectedDevices\e[0m]"
echo -e " $RemoteKodi "
echo -e ""
select opt in "${options[@]}" "All" ; do
if [[ $REPLY = 'QUIT' || $REPLY = 'quit' ]] ; then
exit 1
elif (( REPLY == 1 + ${#options[@]} )) ; then
clear
NetworkScan $(for file in $(echo ${options[@]}); do echo -n "$file " ; done)
elif (( REPLY > 0 && REPLY <= ${#options[@]} )) ; then
clear
NetworkScan "$opt"
else
echo -e "Invalid option. Try another one."
sleep 2 &>/dev/null
clear
StartMenu
fi
done
}
Args=( $(for file in $(echo "[email protected]"); do echo "$file" ; done | xargs -0) )
ArgsCount=${#Args[@]}
if [ "$ArgsCount" = '0' ]
then
GetNetworks
else
echo "${Args[@]}" | grep "\.1/24" &>/dev/null
if [ "$?" = '0' ]
then
options=( $(for file in $(echo ${Args[@]}); do nmap -p 5555 $file -oG - | grep "open" | cut -d" " -f2 ; done | xargs -0) )
else
options=( $(for file in $(echo ${Args[@]}); do echo $file ; done | xargs -0) )
fi
echo -e "\n\n"
cd $(grep 'MainPath=' $HOME/.][NT3L][ST][CKS/main.conf | cut -d'=' -f2 | sed -e "s:/$::g") &>/dev/null
TotalConnectedDevices="$(adb devices 2>/dev/null | grep -v "List" | grep -v "^$" | grep -iv "daemon" | sort | uniq | wc -l)"
ConnectedDevices="$(adb devices 2>/dev/null | grep -v "List" | grep -v "^$" | grep -iv "daemon" | grep -iv "offline" | sort | uniq | wc -l)"
ConnectedOffline="$(adb devices 2>/dev/null | grep -v "List" | grep -v "^$" | grep -iv "daemon" | grep -i "offline" | sort | uniq | wc -l)"
prompt="$(echo -e "\e[96m][NT3L][G3NC][ NetworkScan Menu:\e[0m")"
echo -e " $prompt $TotalConnectedDevices "
echo -e " [\e[96m$ConnectedOffline\e[0m]----------------------------------[\e[96m$ConnectedDevices\e[0m]"
echo -e " $RemoteKodi "
echo -e ""
select opt in "${options[@]}" "All" "Pick Network" ; do
if [[ $REPLY = 'QUIT' || $REPLY = 'quit' ]] ; then
exit 1
elif [[ $REPLY = 'KILL' || $REPLY = 'kill' ]] ; then
clear
killall adb gnome-terminal xterm terminator &>/dev/null
exit 1
elif [[ $REPLY = 'LIST' || $REPLY = 'list' ]] ; then
clear
$(declare -f ListDevicesConnected)
NetworkScan $(for file in $(echo ${options[@]}); do echo -n "$file " ; done)
elif [[ $REPLY = 'REFRESH' || $REPLY = 'refresh' || $REPLY = 'RELOAD' || $REPLY = 'reload' ]] ; then
clear
NetworkScan $(for file in $(echo ${options[@]}); do echo -n "$file " ; done)
elif [[ $REPLY = 'FireStarter' || $REPLY = 'fIREsTARTER' ]] ; then
clear
xterm -e $(grep 'MainPath=' $HOME/.][NT3L][ST][CKS/main.conf | cut -d'=' -f2 | sed -e "s:/$::g")/Scriptz/FireStarterUP.sh &
NetworkScan $(for file in $(echo ${options[@]}); do echo -n "$file " ; done)
elif [[ $REPLY = 'APK' || $REPLY = 'apk' ]] ; then
clear
for apk in $(find $(grep 'MainPath=' $HOME/.][NT3L][ST][CKS/main.conf | cut -d'=' -f2 | sed -e "s:/$::g")/AApushApk/SendAPK -type f -iname "*.apk"); do adb install "$apk" ; done
NetworkScan $(for file in $(echo ${options[@]}); do echo -n "$file " ; done)
elif [[ $REPLY = 'REBOOT' || $REPLY = 'reboot' ]] ; then
clear
$(grep 'MainPath=' $HOME/.][NT3L][ST][CKS/main.conf | cut -d'=' -f2 | sed -e "s:/$::g")/Scriptz/RebootDevices.sh
NetworkScan $(for file in $(echo ${options[@]}); do echo -n "$file " ; done)
elif [[ $REPLY = 'stop' || $REPLY = 'STOP' ]] ; then
clear
adb kill-server
adb start-server
NetworkScan $(for file in $(echo ${options[@]}); do echo -n "$file " ; done)
elif [[ $REPLY = 'HELP' || $REPLY = 'help' ]] ; then
clear
echo -e "$(HelpMe)"
NetworkScan $(for file in $(echo ${options[@]}); do echo -n "$file " ; done)
elif [[ $REPLY = 'USBCHECK' || $REPLY = 'usbcheck' || $REPLY = 'usb' || $REPLY = 'USB' ]] ; then
terminator -e dmesg -wH &
clear
NetworkScan $(for file in $(echo ${options[@]}); do echo -n "$file " ; done)
elif [[ $REPLY = 'html' || $REPLY = 'HTML' ]] ; then
clear
xterm -e $(grep 'MainPath=' $HOME/.][NT3L][ST][CKS/main.conf | cut -d'=' -f2 | sed -e "s:/$::g")/Scriptz/GenerateHTML.sh
iceweasel $(grep 'MainPath=' $HOME/.][NT3L][ST][CKS/main.conf | cut -d'=' -f2 | sed -e "s:/$::g")/ScreenShots/index.html &
NetworkScan $(for file in $(echo ${options[@]}); do echo -n "$file " ; done)
elif [[ $REPLY = 'BACK' || $REPLY = 'back' || $REPLY = 'Menu' || $REPLY = 'menu' || $REPLY = 'MENU' ]] ; then
clear
StartMenu
elif [[ $REPLY = 'UpdateKodi' || $REPLY = 'uPDATEkODI' ]] ; then
clear
KodiAPKMenu
elif (( REPLY == 1 + ${#options[@]} )) ; then
clear
for file in $(echo ${options[@]}); do adb connect "$file" ; done
NetworkScan $(for file in $(echo ${options[@]}); do echo -n "$file " ; done)
elif (( REPLY == 2 + ${#options[@]} )) ; then
clear
GetNetworks
elif (( REPLY > 0 && REPLY <= ${#options[@]} )) ; then
clear
adb connect "$opt"
clear
NetworkScan $(for file in $(echo ${options[@]}); do echo -n "$file " ; done)
else
echo -e "Invalid option. Try another one."
sleep 2 &>/dev/null
clear
NetworkScan $(for file in $(echo ${options[@]}); do echo -n "$file " ; done)
fi
done
fi
}
The chunk of code above is setup to be a Menu in the terminal. NetworkScan is just one of the Menu options. If you make a base Menu setup with options: "Network Scan" , "Install APKs", "Change Launcher" etc. you could have "Change Launcher" launch a script that would have something like this in it.
Code:
for DroidID in $(adb devices 2>/dev/null | grep -v "List" | grep -v "daemon" | grep -v "^$" | cut -f1)
do
xterm -e $(grep 'MainPath=' $HOME/.][NT3L][ST][CKS/main.conf | cut -d'=' -f2)/Scriptz/Clean.sh "$DroidID" &
done
The above script gets all connected devices and then loops through their serial starting another script while passing the serial as a parameter. You would need to make sure the script that gets ran applies the parameter as the serial. Example below is used to remove all 3rd party apps installed, data and then uninstall it
Code:
#!/bin/bash
SerialNum="$1"
IsDeviceOffline="$(adb -s "$1" devices | grep "$1" | cut -f2)"
function AutoClean() {
echo -e ""
echo -e "Clearing App Data And Removing APKs"
for file in $(adb -s "$1" shell pm list packages -3 | cut -d':' -f2)
do
adb -s "$1" shell pm clear "$(echo "$file" | tr -d '\r')"
adb -s "$1" uninstall "$(echo "$file" | tr -d '\r' )"
done
echo -e ""
read -p "Finished Auto Cleaning"
}
echo -e "$IsDeviceOffline" | grep -i "offline" &>/dev/null
if [ "$?" != '0' ]
then
AutoClean "$SerialNum"
else
echo -e "Device:"$SerialNum" Is Offline!"
read -p "Exiting Script"
fi
nyln said:
Hello everyone!
I have had to set up quite a few of these sticks, so I wanted to start a little development tool to automate the process.
This is just a stupid bash script but it will make your TV usable without ads by installing Launcher Hijack 3 and configuring it for you and X43Stream. If anyone has requests I will work on this further. Leanback will not work, someone needs to mod it.
Source
PHP:
echo "Please ensure you are already connected and adb is installed correctly."
sleep 1
echo "Installing Launcher Hijack 3 (LH3).."
adb install "LauncherHijack3.apk"
echo "Installing TV Launcher.."
adb install "TVLauncher.apk"
echo "Installing XFinity Stream latest July 2017.."
adb install "X43Stream.apk"
echo "Opening LH3.."
adb shell am start -n com.baronkiko.launcherhijack/.MainActivity
sleep 3
echo "Selecting new launcher.."
adb shell input keyevent 23
sleep 1
adb shell input keyevent 23
sleep 1
adb shell am start -n com.awe.dev.pro.tv/.Launcher
echo "Enjoy, try out the home button!"
echo "It may not work every time, press again, work in progress :)"
Thanks for this. I use a slightly edited version of this on all of my firesticks now.
Click to expand...
Click to collapse
Anyone knows if is there a new update for the xfinity app for the firetv?
zeroth said:
Anyone knows if is there a new update for the xfinity app for the firetv?
Click to expand...
Click to collapse
Bump
So this is a fun one.
I had my devices loaded with magisk. Everything was fine till a recent update for magisk (I believe v18.0.0). The apk downloaded and then it needed to flash the update. I selected the option with the tag 'recommended' next to it and then it booted straight to the boot loader. I'm able to connect and control through fashboot or recovery but nothing I seem to do fixes it. I saw a twrp image available so I booted to that (not flashed over the current recovery) and did a factory reset and nothing. Also tried a factory reset from stock recovery. Still same story. I'm downloading the latest firmware from the offical asus site with the idea to flash it through recovery but if anyone can suggest anything else before or if it is to fail that would be great.
Helpful info
Model: WW International (A002)
Bootloader displays the following:
Product_name - Siva
Storage_variant - UFS
Bootloader version - 1.23
Version - WW_ZS571KL-14.1600.1801.44
Serial Number - 'this is blank'
Secure boot - enabled
Device state - unlocked
Updates
Update 1:
So I reflashed the original zip firmware with twrp. Now I'm stuck at the asus logo.
Update 2:
I tried again with flashing the original zip firmware. This firmware is provided by the asus website but when I did a full wipe and flash in twrp, when attempting to reboot it said that there was no os installed so turns out the zip files are just updates and not the whole image. I've found an image here but have yet to test it. Fingers crossed it doesn't include a rootkit.
Update 3:
Well this is new (at least for me)... So I downloaded the zip from the link in the second update and instead of a single rom file I got a bunch of img and bin files. It said to use the 'qualcomm flash image loader' sooooo yeah. I loaded up the program (in a vm since im running on osx) and the files it asks for in all available options don't exist in the firmware folder. On the bright side there seems to be valuable files in the firmware folder like the 'system.img'. After trying to deconstruct the type of rom structure is being used (with reference to this) I copied over the offical update zip from the asus site and the 'system.img' from third-party site. I'll wipe and flash both then update what happens.
Update 3.5:
As a side note, if I manage to get this to work I'll post a guide with relevant files to restore to stock from this state.
Update 4:
SUCSESS! I flashed the update zip from asus using twrp and flashed the 'system.img' using fastboot. I'm now seeing a beautiful spinning wheel. After more digging into the firmware folder from the third-pary there was an sh file which flashed many files to the device with fastboot. Currently setting up the device but will update if there's any major issues/crashes/bugs
Update 4.1:
So not even a second in and wifi doesn't work. Probably need to flash a few more images. Gonna flashing everything from fastboot this time round.
Update 4.5:
So to give some context, here is the '.sh' file that came with the third-party firmware.
Code:
#!/bin/bash
#./fastboot getvar version-bootloader
STORAGE_TYPE=unknown
uname -a
OS_VERSION=`getconf LONG_BIT`
if [ "$OS_VERSION" == 32 ]; then
echo "We don't support 32bit os environment, exit!"; exit 1
fi
rm fastboot.log
echo "Saving log to fastboot.log"
echo "flash partition:0 gpt_both0.bin..."
./fastboot flash partition:0 gpt_both0.bin > fastboot.log 2>&1
grep -E 'FAILED|error' fastboot.log
RETVAL=$?
if [ $RETVAL -eq 0 ];then
echo 'failed and exit'; exit 1
fi
echo "flash partition:1 gpt_both1.bin..."
./fastboot flash partition:1 gpt_both1.bin > fastboot.log 2>&1
grep -E 'FAILED|error' fastboot.log
RETVAL=$?
if [ $RETVAL -eq 0 ];then
echo 'failed and exit'; exit 1
fi
echo "flash partition:2 gpt_both2.bin..."
./fastboot flash partition:2 gpt_both2.bin > fastboot.log 2>&1
grep -E 'FAILED|error' fastboot.log
RETVAL=$?
if [ $RETVAL -eq 0 ];then
echo 'failed and exit'; exit 1
fi
echo "flash partition:3 gpt_both3.bin..."
./fastboot flash partition:3 gpt_both3.bin > fastboot.log 2>&1
grep -E 'FAILED|error' fastboot.log
RETVAL=$?
if [ $RETVAL -eq 0 ];then
echo 'failed and exit'; exit 1
fi
echo "flash partition:4 gpt_both4.bin..."
./fastboot flash partition:4 gpt_both4.bin > fastboot.log 2>&1
grep -E 'FAILED|error' fastboot.log
RETVAL=$?
if [ $RETVAL -eq 0 ];then
echo 'failed and exit'; exit 1
fi
echo "flash partition:5 gpt_both5.bin..."
./fastboot flash partition:5 gpt_both5.bin > fastboot.log 2>&1
grep -E 'FAILED|error' fastboot.log
RETVAL=$?
if [ $RETVAL -eq 0 ];then
echo 'failed and exit'; exit 1
fi
echo "flash bootloader bootloader.img ..."
./fastboot flash bootloader bootloader.img > fastboot.log 2>&1
grep -E 'FAILED|error' fastboot.log
RETVAL=$?
if [ $RETVAL -eq 0 ];then
echo 'failed and exit'; exit 1
fi
echo "flash dsp adspso.bin..."
./fastboot flash dsp adspso.bin >> fastboot.log 2>&1
grep -E 'FAILED|error' fastboot.log
RETVAL=$?
if [ $RETVAL -eq 0 ];then
echo 'failed and exit'; exit 1
fi
echo "flash mdtp mdtp.img..."
./fastboot flash mdtp mdtp.img >> fastboot.log 2>&1
grep -E 'FAILED|error' fastboot.log
RETVAL=$?
if [ $RETVAL -eq 0 ];then
echo 'failed and exit'; exit 1
fi
echo "flash splash splash.img..."
./fastboot flash splash splash.img >> fastboot.log 2>&1
grep -E 'FAILED|error' fastboot.log
RETVAL=$?
if [ $RETVAL -eq 0 ];then
echo 'failed and exit'; exit 1
fi
echo "flash asusfw asusfw.img..."
./fastboot flash asusfw asusfw.img >> fastboot.log 2>&1
grep -E 'FAILED|error' fastboot.log
RETVAL=$?
if [ $RETVAL -eq 0 ];then
echo 'failed and exit'; exit 1
fi
echo "reboot-bootloader..."
./fastboot reboot-bootloader >> fastboot.log 2>&1
grep -E 'FAILED|error' fastboot.log
RETVAL=$?
if [ $RETVAL -eq 0 ];then
echo 'failed and exit'; exit 1
fi
echo "wait for 5 seconds for bootloader to be ready..."
sleep 5
echo "flash modem NON-HLOS.bin..."
./fastboot flash modem NON-HLOS.bin >> fastboot.log 2>&1
grep -E 'FAILED|error' fastboot.log
RETVAL=$?
if [ $RETVAL -eq 0 ];then
echo 'failed and exit'; exit 1
fi
echo "flash boot boot.img..."
./fastboot flash boot boot.img >> fastboot.log 2>&1
grep -E 'FAILED|error' fastboot.log
RETVAL=$?
if [ $RETVAL -eq 0 ];then
echo 'failed and exit'; exit 1
fi
echo "flash recovery recovery.img..."
./fastboot flash recovery recovery.img >> fastboot.log 2>&1
grep -E 'FAILED|error' fastboot.log
RETVAL=$?
if [ $RETVAL -eq 0 ];then
echo 'failed and exit'; exit 1
fi
echo "flash system system.img..."
./fastboot flash system system.img >> fastboot.log 2>&1
grep -E 'FAILED|error' fastboot.log
RETVAL=$?
if [ $RETVAL -eq 0 ];then
echo 'failed and exit'; exit 1
fi
echo "format ADF..."
./fastboot format ADF >> fastboot.log 2>&1
grep -E 'FAILED|error' fastboot.log
RETVAL=$?
if [ $RETVAL -eq 0 ];then
echo 'failed and exit'; exit 1
fi
echo "format asdf..."
./fastboot format asdf >> fastboot.log 2>&1
grep -E 'FAILED|error' fastboot.log
RETVAL=$?
if [ $RETVAL -eq 0 ];then
echo 'failed and exit'; exit 1
fi
echo "format metatdata..."
./fastboot erase metadata >> fastboot.log 2>&1
grep -E 'FAILED|error' fastboot.log
RETVAL=$?
if [ $RETVAL -eq 0 ];then
echo 'failed and exit'; exit 1
fi
./fastboot oem uart-off
./fastboot reboot -w
I'm not gonna use the script since there's a few things here and there I wanna change as well as input the most up to date images where possible.
Update 5:
Back at square 1... kinda. I'm gonna try and flash files only from the third-party provider this time. Also no twrp since I tried installing twrp and then tried to do a factory reset. Also to the guys that 'ported' twrp it really only works to wipe things and view root directories (at least in my experience) .
Update 6:
I think I'm gonna cry I'm so happy. After pulling an all nighter I now have wifi and a bootable phone! I'm gonna set it up and hopefully be able to go to sleep while google re-downloads all my apps.
Update 6.1:
So I'll post the whole process to restore in the next post but I've been awake for almost 30 hours so another time it will be. Also I learnt my lesson to make NAND backups from now on.
Update 7:
After a short time of use, the device slowed a bit. This could have been cause of anything but I decided a reboot would resolve the issue but instead revealed another. The device was once again stuck at the asus logo. I quickly tried re-flashing some of the files without doing a full wipe in the hope I would be able to keep my data but nothing. I've sent an email to ASUS asking for a full stock rom but am doubtful I will get any files back so I'll keep looking for solutions.
Update 8:
Okay, I think I've finally got this down. So I redid a full wipe and reset through fastboot. As soon as I got into the device I did a factory reset. This must have done something which allowed me to later reboot the device without it getting stuck. Considering how much I've added on this thread I'll create a new thread as a guide to complete this
Guide
Hey! I would really appreciate it if you could add a guide cause I'm a newbie on android.
DrunkenPoney said:
Hey! I would really appreciate it if you could add a guide cause I'm a newbie on android.
Click to expand...
Click to collapse
Sorry but it's gonna have to wait. For some reason when I tried to reboot it, it got stuck at the logo again so back at square 1.
@Sparklapse
stock roms are available on asus support homepage.
see here: https://www.asus.com/us/Phone/ZenFone-AR-ZS571KL/HelpDesk_BIOS/
latest version is: https://dlcdnets.asus.com/pub/ASUS/ZenFone/ZS571KL/UL-ASUS_A002-WW-14.1600.1805.51-user.zip
HD2Owner said:
@Sparklapse
stock roms are available on asus support homepage.
see here: https://www.asus.com/us/Phone/ZenFone-AR-ZS571KL/HelpDesk_BIOS/
latest version is: https://dlcdnets.asus.com/pub/ASUS/ZenFone/ZS571KL/UL-ASUS_A002-WW-14.1600.1805.51-user.zip
Click to expand...
Click to collapse
Unless I've been flashing it incorrectly, I believe these are only firmware updates. When looking into the package it's missing certain images like the 'system.img' and 'recovery.img'. Though I'd be more than happy for you to prove me wrong here.
Solution??
Did you find any solution??
Hi to all and OP
I know this is a longshot but I'm almost in the same position as yourself, you mentioned that you used TWRP for your revival attempts. unfortunately my AR bootloader is locked so I was wondering how you managed to unlock yours to use a custom recovery?, for all I know the only way is with the Asus app but I think it has been removed from the site. any chance you have a copy of the unlock apk? or maybe you can point to he TWRP img version you used?
Thanks in advance for any info you can share.