connect KF via Telnet - Kindle Fire General

sorry for my poor English,,,
rooted, busybox needed,
adb shell
vi /data/opentel.sh
Code:
# cat /data/opentel.sh
busybox telnetd -l /system/bin/sh
echo " "
echo "Telnetd Service Running..."
busybox ifconfig | grep 'inet addr' | grep -v '127.0.0.1' | awk '{print $2}'
sleep 1
#echo " "
#echo "PID:"
var1=`busybox ps | grep telnetd | grep '/system/bin/sh' | awk '{print $1}'`
echo TELNET_PID=${var1}
echo " end"
sava, and exit vi editor,
chmod 755 /data/opentel.sh
Open Root Explorer, Then add this Shell Script to BookMark,
Everytime When need to telnet your KF, just Open R.E and run this BookMark ,
and run cmd "telnet KF_IP_ADDR" on PC,

I exec shell script with Tasker. That's works fine. and the script can run on booting.

Related

Arch linux chroot

I started using Arch some months ago and I really enjoying it. Coming from a released based distro, it feels really nice been able to choose exactly what you want to run in your system and always have the packages up to date. For a while I have been planning on running ubuntu in my transformer but I just don't feel too comfortable with ubuntu , so decided to run arch in my transformer. I couldn't find a tutorial so I scavenged the net and found bits and peace that I put together to make this tutorial. What I like about arch is that I am in control of my system and I can run exactly what I want, thanks awesomely documented Arch!
This is a tutorial that will show you how to run Arch Linux in a chrooted environment within your Asus Tarsnformer. I will not provide a simple script that if you run it will do everything for you, instead I will teach you how to make your own installation by grabbing all necessary elements.
You will need:
Arch Live image: Go to http://archlinuxarm.org/developers/downloads and grab the omap 3/4 package.
Install environment: It can be your internal storage or a sd/micro card. Here I will show how to use the micro sd card.
Script for starting the chroot: I grabbed mine from http://forum.xda-developers.com/showthread.php?t=1517993&highlight=chroot and did some modifications. Thanks-miska-
Rooted Asus Transformer(Prime?) with Terminal: You need root to mount the file system and loop devices. In theory this should work in the Prime too.
Linux Machine
Step 1:
For installing arch in a (micro)sd card (I prefer micro as I don't need the dock for using it), first you need to format the card and make two partitions. (I used gparted) Make one partition fat and assign a small amount of space(I have a 4gb micro and assigned 128mb to the fat partition), then make the rest ext4. Make sure the fat partition is first and the ext one is second.
Step 2:
Now as root you need to extract the package in the ext partition of your card. REMEMBER to be root, I got stuck thinking there was something wrong with the package I downloaded but it was that I was unpacking as normal user.
Code:
# tar -c /path/to/extpartition -xzf ArchLinuxARM-omap-smp-latest.tar.gz
Now you have a arch environment in your (micro)sd card.
Step 3:
In your asus transformer create a folder called 'arch' in the root of your internal storage.
Code:
#mkdir /sdcard/arch
Or use a file manager.
Now place this script somewhere in your transformer, I usually keep it in /sdcard/Downloads
Code:
#!/bin/sh
# Modify this according to your needs
DEVICE="/dev/block/mmcblk1p2"
LOOP="no"
# Maybe this as well
MNT_PATH="/mnt/sdcard/arch"
# Modify only if you know, what are you doing
BINDS="dev dev/pts proc sys mnt/sdcard"
ANDROID_BINDS=" /system /data "
TMPS="tmp var/tmp var/log var/run"
MY_MOUNTS=""
unset PS1
# Helper functions
die() {
echo " $1"
exit 1
}
safe_mount() {
mkdir -p "$MNT_PATH""$2"
if [ "$3" ]; then
OPTION=" $3 "
else
OPTION=""
fi
if [ -z "`mount | grep " $MNT_PATH$2 "`" ]; then
mount $OPTION "$1" "$MNT_PATH$2" || die "Can't mount $2!!!"
fi
MY_MOUNTS="$MNT_PATH$2 $MY_MOUNTS"
}
# Real work
[ "`whoami || echo root`" = "root" ] || die "You must be root first!"
LOOP_ARG=""
[ "$LOOP" = "no" ] || LOOP_ARG=" -o loop "
safe_mount $DEVICE "" "$LOOP_ARG -t ext4 "
for i in $BINDS; do
safe_mount "/$i" "/$i" " -o bind "
done
if [ -d /Removable ]; then
for i in /Removable/*; do
[ -d "$i" ] && safe_mount $i /mnt$i " -o bind "
done
fi
for i in $ANDROID_BINDS; do
safe_mount $i /mnt/android$i " -o bind "
done
for i in $TMPS; do
safe_mount none /$i " -t tmpfs "
done
mount -o remount,ro "$MNT_PATH"
chroot "$MNT_PATH" /sbin/fsck.ext2 -y "$DEVICE"
mount -o remount,rw "$MNT_PATH"
# Tweak configuration of the chroot during first start
#if [ \! -f "$MNT_PATH"/etc/profile.d/tweak.sh ]; then
#mkdir -p "$MNT_PATH"/home/opensuse
echo 'nameserver 8.8.8.8' > "$MNT_PATH"/etc/resolv.conf
#echo 'net:x:3003:root,opensuse' >> "$MNT_PATH"/etc/group
#echo 'opensuse:x:1000:100::/home/opensuse:/bin/bash' >> "$MNT_PATH"/etc/passwd
#echo 'opensuse:$1$joWqOQdr$YsapocP32UtdiR3PKBXVM1:15395:0:::::' \
# >> "$MNT_PATH"/etc/shadow
#sed -i 's|^root:.*|root:$1$joWqOQdr$YsapocP32UtdiR3PKBXVM1:15395:0:::::|' \
# "$MNT_PATH"/etc/shadow
#echo '#!/bin/sh
#export TERM=linux
#export LANG="en_US.utf-8"
#export EDITOR="busybox vi"
#alias vi="busybox vi"
#precmd() { :; }
#if [ "`whoami`" = root ]; then
# export HOME=/root
# export USER=root
# hostname -F /etc/HOSTNAME
#fi
#if [ -z "$CHROOTED" ]; then
# export CHROOTED=yes
# export HOME="/home/opensuse"
# export USER="opensuse"
# su opensuse
#fi
#' > "$MNT_PATH"/etc/profile.d/tweak.sh
#fi
export PATH="/bin:/sbin:/usr/bin:/usr/sbin:/system/xbin:/system/bin"
# Chroot
chroot "$MNT_PATH" /bin/bash
#chroot "$MNT_PATH" /root/init.sh
# Cleanup
echo "Umount everything"
for i in $MY_MOUNTS; do
umount -l $i
done
Step 4:
Chmod +x the script and run it as root.
Code:
su
#chmod +x scriptname.sh
sh scriptname.sh
The script will mount the ext partition of your (micro)sd card in /sdcard/arch and will chroot into it. It also does other really nice things, such as mounting your android partitions to /mnt so you can access them from within your arch environment. I have disabled some lines that are used to set up a some environment variables, but you should still be able to get a fully functional command-line environment and you can enable them and modify them as you want.
Step 5:
The rest is completely up to you, now you have arch running in your transformer. But what!? You need X?! really???? Ok, so lets create a vnc server so we can remote into it.
Your network connection should work, so the first thing to do is an update
Code:
#pacman -Syu
Now install xorg
Code:
#pacman -S xorg-server xorg-xinit xorg-twm xorg-xclock xterm
Now install a vncserver
Code:
#pacman -S tightvnc
And now this is the tricky part(And I spent a lot of time in this).
I grabbed this script from the UbuntuInstaller post. This is the script they use for setting a resolution at each boot. What I did was to remove the resolution prompt and fix the resolution to 1280x752(fullscreen) and remove some ubuntu stuff. I also added an export for HOME and USER that will allow you to run 'vncserver' as root.
Code:
#!/bin/bash
#############################################
# Asks User to screen size and saves as REZ #
#############################################
#echo "Now enter the screen size you want in pixels (e.g. 800x480), followed by [ENTER]:"
#read REZ
###########################################
# Tidy up previous LXDE and DBUS sessions #
###########################################
#rm /tmp/.X* > /dev/null 2>&1
#rm /tmp/.X11-unix/X* > /dev/null 2>&1
#rm /root/.vnc/localhost* > /dev/null 2>&1
#rm /var/run/dbus/pid > /dev/null 2>&1
############################################################
# enable workaround for upstart dependent installs #
# in chroot'd environment. this allows certain packages #
# that use upstart start/stop to not fail on install. #
# this means they will have to be launched manually though #
############################################################
#dpkg-divert --local --rename --add /sbin/initctl > /dev/null 2>&1
#ln -s /bin/true /sbin/initctl > /dev/null 2>&1
###############################################
# start vnc server with given resolution and #
# DBUS server, (and optionally an SSH server) #
###############################################
export HOME="/root/"
export USER="root"
vncserver :0 -geometry 1280x752
dbus-daemon --system --fork > /dev/null 2>&1
/etc/rc.d/sshd start
#echo
#echo "If you see the message 'New 'X' Desktop is localhost:0' then you are ready to VNC into your ubuntu OS.."
#echo
#echo "If VNC'ing from a different machine on the same network as the android device use the 1st address below:"
##########################################
# Output IP address of android device #
##########################################
ifconfig | grep "inet addr"
#echo
#echo "If using androidVNC, change the 'Color Format' setting to 24-bit colour, and once you've VNC'd in, change the 'input mode' to touchpad (in settings)"
#echo
#echo "To shut down the VNC server and exit the ubuntu environment, just enter 'exit' at this terminal - and WAIT for all shutdown routines to finish!"
#echo
###############################################################
# Spawn and interactive shell - this effectively halts script #
# execution until the spawning shell is exited (i.e. you want #
# to shut down vncserver and exit the ubuntu environment) #
###############################################################
/bin/bash -i
#########################################
# Disable upstart workaround and #
# kill VNC server (and optionally SSH) #
# Rename used xstartup to its first file#
#########################################
vncserver -kill :0
/etc/rc.d/sshd stop
Place this script in /root/, give it the name 'init.sh' and make sure it is executable(chmod +x). Now in the previous script comment the line:
Code:
chroot "$MNT_PATH" /bin/bash
and uncomment the line
Code:
chroot "$MNT_PATH" /root/init.sh
Step 6:
Now you should be able to start a vncserver with twm as your window manager and a xterm.
You can now go to
https://wiki.archlinux.org/index.php/Desktop_Environment
or
https://wiki.archlinux.org/index.php/Window_Manager
and set up the desktop environment that you like the most.
Remember that you need to set up the graphical environment to start manually and not at boot. In a normal environment you would usually use 'startx' which will read the .xinitrc file and run the programs from there. In our case put everything that needs to go into .xinitrc into ~/.vnc/xstartup. An example of my ~/.vnc/xstartup
Code:
#!/bin/bash
xrdb $HOME/.Xresources
exec startfluxblox
This will start an empty fluxbox window manager.

[Q] Busybox 'sh' Issue Help

I am trying to get CIFS working on my tablet per the instructions on this thread: http://forum.xda-developers.com/showthread.php?t=2003836
I have busybox installed and have created the script below, but whenever I run the script in terminal emulator or Script Manager I get:
not founds/bin/mountscript.sh[2]:
not founds/bin/mountscript.sh[9]:
etc...
I have also tried the busybox ash to no avail.
It seems like variables are not being set. What would cause this?
Code:
#!/system/bin/sh
# Your settings here
USERNAME="user"
PASSWORD="password"
IPADDRESS="10.0.0.84"
SHARE="DriveJ"
MOUNT_POINT="/sdcard/cifs/Drive"
# If you need to change the mount command edit this
MOUNT_CMD="\
mount -t cifs \
\
-o \
user=$USERNAME,\
password=$PASSWORD,\
unc=\\\\\\\\\\\\\\\\$IPADDRESS\\\\\\\\$SHARE \
\
//$IPADDRESS/$SHARE \
$MOUNT_POINT"
COMMANDS="\
insmod /sdcard/mods/md4.ko; \
insmod /sdcard/mods/nls_utf8.ko; \
insmod /sdcard/mods/cifs.ko; \
$MOUNT_CMD
"
# Starting ADB...
PORT=`getprop service.adb.tcp.port`
setprop service.adb.tcp.port 5555
stop adbd
start adbd
adb connect localhost
echo adm connected
# Make sure we only use the first device (sometimes there is more than one)
echo serial being set
SERIAL=`adb devices | head -n2 | tail -n1 | cut -f1`
echo SERIAL=$SERIAL
if [ "$SERIAL" = "" ]; then
echo "ERROR: Could not find ADB device.";
fi
echo Mounting share via adb...
adb -s $SERIAL shell su -c "$COMMANDS"
# If you started adb, then stop it here for security:
adb disconnect localhost
stop adbd
setprop service.adb.tcp.port $PORT
start adbd
RESULT=`mount | grep $MOUNT_POINT`
if [ "$RESULT" = "" ]; then
echo "Mounting failed..."
else
echo "Mounting sucess!"
fi
echo Done... You may close this script window.

JB system.img, root, bloatware, power saving

I have downloaded and installed JB and made a script to root system.img with SuperSu, remove some Bloatware and install BusyBox.
for app in AccuweatherWidget.apk AccuweatherWidget_Main.apk AccuweatherWidget_Main.odex AccuweatherWidget.odex AllshareMediaServer.apk AllshareMediaServer.odex AllshareService.apk AllshareService.odex AnalogClockSimple.apk AnalogClockSimple.odex AnalogClockUnique.apk AnalogClockUnique.odex ChatON_MARKET.apk DigitalClock.apk DigitalClock.odex DualClockAnalog.apk DualClockAnalog.odex DualClockDigital.apk DualClockDigital.odex FmRadio.apk FmRadio.odex FotaClient.apk FotaClient.odex GoogleSearchWidget.apk GoogleSearchWidget.odex Kies.apk Kies.odex kieswifi.apk kieswifi.odex MediaUploader.apk Microbes.apk Microbes.odex MobileTrackerEngineTwo.apk MobileTrackerEngineTwo.odex MusicFX.apk MusicFX.odex MusicPlayer.apk MusicPlayer.odex PanningTryActually.apk PanningTryActually.odex PickUpTutorial.apk PickUpTutorial.odex PlusOne.apk PolarisViewer.apk SamsungApps.apk SamsungAppsUNA3.apk Samsungservice.apk SamsungWidget_ProgramMonitor.apk SamsungWidget_ProgramMonitor.odex sCloudBackupApp.apk sCloudBackupProvider.apk sCloudDataRelay.apk sCloudDataSync.apk sCloudSyncBrowser.apk sCloudSyncCalendar.apk sCloudSyncContacts.apk SecCalculator2.apk SecCalculator2.odex SecDownloadProviderUi.apk SecDownloadProviderUi.odex SecEmail.apk SecEmail.odex SecExchange.apk SecExchange.odex SecFileShareClient.apk SecFileShareClient.odex SecFileShareServer.apk SecFileShareServer.odex SecHTMLViewer.apk SecHTMLViewer.odex SecMiniDiary_WVGA.apk SecNoteMyFiles.apk SecNoteMyFiles.odex SNS.apk SPPPushClient_Prod.apk Street.apk Swype.apk SyncmlDM.apk Talk.apk talkback.apk VoiceSearchStub.apk voice_talk_U1.apk YahoonewsWidget.apk YahoonewsWidget.odex YahoostockWidget.apk YahoostockWidget.odex ; do
if [ -e "system/app/$app" ] || [ -h "system/app/$app" ] ; then
rm "system/app/$app"
fi
done
Is there more Bloatware that can be safely removed?
install -m 6755 ../UPDATE-SuperSU-v1.00/system/xbin/su system/xbin/
install -m 755 busybox system/bin/
for app in '[' '[[' ash awk base64 basename blkid bunzip2 bzcat bzip2 cal cat chat chattr chgrp chmod chown chroot chrt cksum clear comm cp crond crontab cut date dd depmod devmem df diff dirname dmesg dnsd dnsdomainname dos2unix du echo egrep env ether-wake expand expr fakeidentd fdflush fdformat fdisk fgrep find fold free freeramdisk fsck fsync ftpd ftpget ftpput getopt grep groups gunzip gzip hd head hexdump hostid hostname httpd hwclock id ifconfig ifenslave inetd inotifyd insmod install ionice iostat ip ipaddr ipcalc iplink iproute iprule iptunnel kill killall killall5 less ln logname losetup ls lsattr lsmod lsof lsusb lzop lzopcat md5sum microcom mkdir mkdosfs mke2fs mkfifo mkfs.ext2 mkfs.vfat mknod mkswap modinfo modprobe more mount mountpoint mt mv nameif nanddump nandwrite nc netstat nice nmeter nslookup ntpd od patch pgrep pidof ping ping6 pkill pmap powertop printenv printf ps pscan pwd rdate rdev readahead realpath renice reset rev rfkill rm rmdir rmmod route run-parts script scriptreplay sed seq setkeycodes setlogcons setsid sha1sum sha256sum sha3sum sha512sum showkey sleep smemcap sort split stat strings stty sum swapoff swapon sync sysctl tac tail tar tee telnet telnetd test tftp tftpd time timeout top touch tr traceroute traceroute6 tty ttysize tunctl umount uname uncompress unexpand uniq unix2dos unlzop unzip uptime usleep uudecode uuencode vconfig vi watch wc wget which who whoami whois xargs zcat ; do
[ -e "system/bin/$app" ] || ln -s busybox "system/bin/$app"
done
echo -e 'nameserver 8.8.4.4\nnameserver 8.8.8.8' >system/etc/resolv.conf
chmod 644 system/etc/resolv.conf
Power consumption of JB was initially very high, I brought it down quite a bit by
echo "dalvik.vm.execution-mode=int:jit" >>/system/build.prop
and at every boot:
echo noop >/sys/block/mmcblk0/queue/scheduler
echo noop >/sys/block/mmcblk0boot0/queue/scheduler
echo noop >/sys/block/mmcblk0boot1/queue/scheduler
echo noop >/sys/block/mmcblk1/queue/scheduler
echo conservative >/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 50 >/sys/devices/system/cpu/cpufreq/conservative/down_threshold
echo 20 >/sys/devices/system/cpu/cpufreq/conservative/freq_step
Is there some rc.local equivalent I can place these commands?
I would also like to replace some stock apps (GMS_Maps.apk Gmail.apk GmsCore.apk Phonesky.apk YouTube.apk) in system.img with updated versions, but this causes the device not to boot with some DRM errors to be seen in logcat. Integrating these with Titanium Backup into the running system works fine.
Tom
Help you this thread?
http://forum.xda-developers.com/showthread.php?t=2135528
About that power comsumption scripts.
After you implemented it, were you able to play games like " six-guns" ?
Was the device lag-free?
install -m 6755 ../UPDATE-SuperSU-v1.00/system/xbin/su system/xbin/
install -m 755 busybox system/bin/
for app in '[' '[[' ash awk base64 basename blkid bunzip2 bzcat bzip2 cal cat chat chattr chgrp chmod chown chroot chrt cksum clear comm cp crond crontab cut date dd depmod devmem df diff dirname dmesg dnsd dnsdomainname dos2unix du echo egrep env ether-wake expand expr fakeidentd fdflush fdformat fdisk fgrep find fold free freeramdisk fsck fsync ftpd ftpget ftpput getopt grep groups gunzip gzip hd head hexdump hostid hostname httpd hwclock id ifconfig ifenslave inetd inotifyd insmod install ionice iostat ip ipaddr ipcalc iplink iproute iprule iptunnel kill killall killall5 less ln logname losetup ls lsattr lsmod lsof lsusb lzop lzopcat md5sum microcom mkdir mkdosfs mke2fs mkfifo mkfs.ext2 mkfs.vfat mknod mkswap modinfo modprobe more mount mountpoint mt mv nameif nanddump nandwrite nc netstat nice nmeter nslookup ntpd od patch pgrep pidof ping ping6 pkill pmap powertop printenv printf ps pscan pwd rdate rdev readahead realpath renice reset rev rfkill rm rmdir rmmod route run-parts script scriptreplay sed seq setkeycodes setlogcons setsid sha1sum sha256sum sha3sum sha512sum showkey sleep smemcap sort split stat strings stty sum swapoff swapon sync sysctl tac tail tar tee telnet telnetd test tftp tftpd time timeout top touch tr traceroute traceroute6 tty ttysize tunctl umount uname uncompress unexpand uniq unix2dos unlzop unzip uptime usleep uudecode uuencode vconfig vi watch wc wget which who whoami whois xargs zcat ; do
[ -e "system/bin/$app" ] || ln -s busybox "system/bin/$app"
done
echo -e 'nameserver 8.8.4.4\nnameserver 8.8.8.8' >system/etc/resolv.conf
chmod 644 system/etc/resolv.conf
Click to expand...
Click to collapse
What exactly does this part do ??
n2851991m said:
What exactly does this part do ??
Click to expand...
Click to collapse
Install busybox and DNS address
Sent from my GT-I9070 using xda app-developers app
Lol My bad
frapeti said:
Install busybox and DNS address
Sent from my GT-I9070 using xda app-developers app
Click to expand...
Click to collapse
Noticed the first 2 lines now
Well i am gonna put the first part ( remove bloatware ) in a script and run.
Already have latest busybox so that's not needed I guess.
Off to nandroid for backup....

Android 4.2.2 (PAC, CM10.1, etc): Mount CIFS share on /sdcard (incl. nls_utf8)

With Android 4.2's multi-user stuff and the dreaded "0" folder, Google broke mounting of CIFS shares for good. (They basically implemented something utterly useless for my needs, and broke something I need on a daily basis.) Cyanogenmod fixed that for mounts outside the /storage hierarchy, but many apps can't go there. And with 4.2.2, Google made using adb on the device very annoying as well, which adds to problems for a workaround for mounting shares in a useful place.
So I looked around for various fixes for that issue and compiled those into one method that works perfectly well for me on a P6810 running the current PAC ROM 20130629. It should probably work for any other CM10.1 or PA3.6x-based ROM as well. A nls_utf8.ko module compiled for the Nexus 10 is included as well, which can be loaded via punchmod (at least in PAC), so you can access shares with Ümläüts in them.
Prerequisites: SManager, SMWidgets, and a working Busybox install (I use Stericson's Busybox Installer).
1.) Extract nls_utf8.ko and punchmod from the attached .zip file and put them in /system/lib/modules. You can put them in some other place as well, but my scripts need to be adjusted then. Next, give the files sufficient permissions:
Code:
chmod 644 /system/lib/modules/nls_utf8.ko
chmod 755 /system/lib/modules/punchmod
2.) Optional: if you want the module to auto-start, create a file called 00punch-nls_utf8 (or whatever you like) with the content below, put it in /etc/init.d and chmod it to 755. To check if nls-utf8 is loaded after a reboot, type lsmod in a terminal window or adb shell - it should display the module name. If punchmod auto-detection fails, read here how to get the right vermagic string for your device: http://forum.xda-developers.com/showthread.php?p=41920265#post41920265
Code:
#!/system/bin/sh
sleep 10
/system/lib/modules/punchmod /system/lib/modules/nls_utf8.ko ""
3.) Here's the script that mounts a CIFS share. Edit the settings on top and either put your correct vermagic string as well, or delete the "$VERMAGIC" part in line 22 and try your luck with auto-detection. I put some sanity checks in the script, but it might not work for all directories in /sdcard (or, /data/media/0, to call it by its 'real' name/location). If you don't want to use the nls-utf8 module, just delete lines 18-23, and iocharset=utf8 in line 67.
Name the script mount-music.sh or something, put the script wherever you like, open SManager and navigate to the script. Run the script with SU permissions. If everything goes well, it will ask you to accept an adb RSA key, and then adb mounts the share. You can also add a desktop widget for quick access to the script with SMWidgets.
Code:
#!/system/bin/sh
# Your settings here
IP="192.168.1.123"
SHARE="Music"
USER="yourusername"
PASS="yourpassword"
MOUNTPOINT="/data/media/0/cifs"
VERMAGIC="3.0.31-CM-ga034655-dirty SMP preempt mod_unload ARMv7 p2v8 "
# Load cifs (if it isn't already loaded)
if [ `lsmod | grep -o cifs` ] ; then
:
else
insmod /system/lib/modules/cifs.ko
fi
# Load nls_utf8 brute-force style (if it isn't already loaded)
if [ `lsmod | grep -o nls_utf8` ] ; then
:
else
/system/lib/modules/punchmod /system/lib/modules/nls_utf8.ko "" "$VERMAGIC"
fi
# Check if cifs $MOUNTPOINT dir exists, create it if not, give sufficient permissions
if [ -d $MOUNTPOINT ] ; then
:
else
mkdir $MOUNTPOINT
fi
chmod 755 $MOUNTPOINT
# Check if $SHARE directory is empty - if not, unmount the share
if [ "$(su root -c busybox ls -A $MOUNTPOINT/$SHARE 2> /dev/null)" == "" ] ; then
:
else
/system/xbin/busybox umount -l $MOUNTPOINT/$SHARE
fi
# Create $SHARE directory if necessary, give sufficient permissions
if [ -d $MOUNTPOINT/$SHARE ] ; then
:
else
mkdir $MOUNTPOINT/$SHARE
fi
chmod 755 $MOUNTPOINT/$SHARE
# Starting adb
adb kill-server
export HOME=/sdcard
# PORT=`getprop service.adb.tcp.port`
setprop service.adb.tcp.port 5555
adb start-server
cat /sdcard/.android/adbkey.pub >> /data/misc/adb/adb_keys
stop adbd
start adbd
adb connect localhost
# Make sure we only use the first device (sometimes there is more than one)
SERIAL=`adb devices | head -n2 | tail -n1 | cut -f1`
if [ "$SERIAL" = "" ] ; then
echo "ERROR: Could not find ADB device.";
fi
# Mounting share via adb
echo Mounting share via adb...
adb -s $SERIAL shell su root -c /system/xbin/busybox mount -t cifs //$IP/$SHARE $MOUNTPOINT/$SHARE -o user=$USER,pass=$PASS,iocharset=utf8,cache=none,directio,CIFSMaxBufSize=130048,rw,file_mode=0777,dir_mode=0777,uid=1015,gid=1015
# If you started adb, then stop it here for security
adb disconnect localhost
stop adbd
PORT=`getprop service.adb.tcp.port`
setprop service.adb.tcp.port $PORT
start adbd
# Show some results
RESULT=`mount | grep $MOUNTPOINT/$SHARE`
if [ "$RESULT" = "" ] ; then
echo "FAILED! //$IP/$SHARE could not be mounted."
else
echo "SUCCESS! //$IP/$SHARE has been mounted on $MOUNTPOINT/$SHARE."
fi
echo
echo All done. You may close this script window now.
4.) This is the script to unmount the share. Name it unmount-music.sh or similar, and edit your settings at the beginning of the script. Again, run it in SManager with SU permissions, and add a desktop widget with SMWidgets if you like.
Code:
#!/system/bin/sh
# Your settings here
SHARE="Music"
MOUNTPOINT="/data/media/0/cifs"
# Check if $SHARE directory exists
if [ -d $MOUNTPOINT/$SHARE ] ; then
# Check if $SHARE directory is empty - if not, unmount the share
if [ "$(su root -c busybox ls -A $MOUNTPOINT/$SHARE 2> /dev/null)" == "" ] ; then
echo "$MOUNTPOINT/$SHARE is empty."
else
su root -c busybox umount -l $MOUNTPOINT/$SHARE
fi
fi
# Show some results
RESULT=`mount | grep $MOUNTPOINT/$SHARE`
if [ "$RESULT" = "" ] ; then
echo "SUCCESS! $MOUNTPOINT/$SHARE has been unmounted."
else
echo "FAILED! $MOUNTPOINT/$SHARE could not be unmounted."
fi
echo
echo All done. You may close this script window now.
Hope this helps some of you. It sure stumped me how incredibly convoluted this simple and much needed procedure has become on Android 4.2.2... just because of that multi-account stuff and new restrictions on adb.
Credits:
Script bits and nls_utf8.ko by H3g3m0n
More script bits by dafunk60 and jmtw000
Punchmod by Jann Horn
Punchmod info by idcrisis
Thanks man, looks awesome, I am going to try it on my 6800.
Do you know how to mount ext4 or ntfs sdcard on CM10.1 based roms?
Removed the original post, still trying to make it work!
I checked vermagic in some existing ko files and found that it is exactly the same as yours.
Sent from my GT-p6800 using Tapatalk HD
m0bster said:
Removed the original post, still trying to make it work!
I checked vermagic in some existing ko files and found that it is exactly the same as yours.
Sent from my GT-p6800 using Tapatalk HD
Click to expand...
Click to collapse
You can try loading the UTF8 module without vermagic string as well, it should work on PAC. Or, make sure you have a blank space at the end of the vermagic string, it is required. Maybe read the short tutorial here: http://forum.xda-developers.com/showthread.php?p=41920265#post41920265
dfkt_ said:
You can try loading the UTF8 module without vermagic string as well, it should work on PAC. Or, make sure you have a blank space at the end of the vermagic string, it is required. Maybe read the short tutorial here: http://forum.xda-developers.com/showthread.php?p=41920265#post41920265
Click to expand...
Click to collapse
I finally managed to mount cifs shares, after loading original cifs and punmode load of nls_utf8.ko.
But I mounted it with cifsmanager. The script always shows "failure to mount" !

[NO ROOT] Amazon Fire TV Setup Tool [ Kills Amazon Launcher + XFINITY STREAM 2017 ]

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

Categories

Resources