Hey folks,
See this link. It reads that it works for any Moto device running Gingerbread.
http://www.droid-life.com/2011/08/25/droid3-1-click-easy-root-already-released/
OK, I succeeded.
My Droid Pro is upgraded from rooted 2.2.1 to 2.3.3.
Follow the standard method may lose the root status next reboot.
I've modified the bat file (Click to root your DROID 3.bat) bellow. (Refer to http://www.psouza4.com/droid3/, Thanks!)
Good luck!
Code:
@echo off
cls
adb kill-server > NUL
COLOR B0
TITLE DROID 3 Easy Root Script
cls
echo ***************************************************************************
echo * *
echo * DROID 3 Easy Root script v7 *
echo * *
echo ***************************************************************************
echo *
echo * Please make sure you meet these pre-requisites:
echo *
echo * (a) install the correct driver
echo * (b) turn on USB debugging (on your phone under Settings -^> Applications)
echo * (c) plug in your phone and set your USB mode to 'charging only'
echo *
echo * Note: your phone will reboot twice during this procedure. This is normal.
echo *
echo * READY TO ROOT YOUR DROID 3 WHEN YOU ARE!
echo *
COLOR E0
pause
echo *
echo * Waiting for your phone to be connected...
echo *
adb wait-for-device > NUL
COLOR B0
echo * Running exploit [part 1 of 3]...
adb kill-server > NUL
adb shell rm /data/local/12m.bak > NUL
adb shell mv /data/local/12m /data/local/12m.bak > NUL
adb shell ln -s /data /data/local/12m
adb reboot
echo *
echo * Rebooting the phone... please wait.
adb kill-server > NUL
COLOR E0
adb wait-for-device > NUL
adb wait-for-device > NUL
COLOR B0
echo *
echo * Running exploit [part 2 of 3]...
adb shell rm /data/local/12m
adb shell mv /data/local/12m.bak /data/local/12m
adb shell rm /data/local.prop.bak > NUL
adb shell mv /data/local.prop /data/local.prop.bak
adb shell echo "ro.sys.atvc_allow_netmon_usb=0" ^> /data/local.prop
adb shell echo "ro.sys.atvc_allow_netmon_ih=0" ^>^> /data/local.prop
adb shell echo "ro.sys.atvc_allow_res_core=0" ^>^> /data/local.prop
adb shell echo "ro.sys.atvc_allow_res_panic=0" ^>^> /data/local.prop
adb shell echo "ro.sys.atvc_allow_all_adb=1" ^>^> /data/local.prop
adb shell echo "ro.sys.atvc_allow_all_core=0" ^>^> /data/local.prop
adb shell echo "ro.sys.atvc_allow_efem=0" ^>^> /data/local.prop
adb shell echo "ro.sys.atvc_allow_bp_log=0" ^>^> /data/local.prop
adb shell echo "ro.sys.atvc_allow_ap_mot_log=0" ^>^> /data/local.prop
adb shell echo "ro.sys.atvc_allow_gki_log=0" ^>^> /data/local.prop
adb reboot
echo *
echo * Rebooting the phone... please wait.
adb kill-server > NUL
COLOR E0
adb wait-for-device > NUL
adb wait-for-device > NUL
COLOR B0
echo *
echo * Running exploit [part 3 of 3]...
[COLOR="Red"]adb shell mount -o remount,rw /dev/block/system /system
adb shell rm /system/bin/su
adb shell rm /system/xbin/su
adb shell rm /system/bin/busybox
adb shell rm /system/xbin/busybox[/COLOR]
adb push busybox /system/xbin/busybox
adb push su /system/xbin/su
adb push Superuser.apk /system/app/Superuser.apk
adb shell chmod 4755 /system/xbin/su
adb shell chmod 755 /system/xbin/busybox
adb shell chown system.system /data
echo *
echo * ALL DONE! YOUR PHONE SHOULD BE ROOTED!
echo *
echo ******************************************************************************
echo.
echo You may now close this window...
echo.
COLOR A0
adb kill-server > NUL
pause
TITLE Command Prompt
COLOR 07
Did you have to do anything different to get it to work? Mine gets stuck on the first reboot and will not doing anything from that point on. The version I have is an .exe file not a bat file
It worked on my 3rd attempt
After reboot I do not have root
Worked just fine for me at the first time.
Maybe something wrong for you.
Try to make a full wipe (save your data first) and then try to root.
Mine gets caught up in the reboot part, screen just stays at the boatloader screen.
Sent from my DROID Pro using XDA App
Thanks, it worked!
I have to say, Gingerbread makes this phone shine.
I finally know how to get this phone working on my Vodafone NL sim. SMS-texting and data, all working.
Only thing not working: sms delivery receipts.
Oh well.
Can anyone help?
Sent from my DROID Pro using XDA App
Script ran without issue, but didn't appear to do anything .
I've also ready Gingerbreak could do the job but did not work either.
Try this, http://hackslurp.com/2011/08/27/how...-3-x2-cliq-on-android-2-3-4-gingerbread-easy/
Worked for me, droid pro on rogers canada(and using a macbook no less!)
lictor4 said:
Try this, http://hackslurp.com/2011/08/27/how...-3-x2-cliq-on-android-2-3-4-gingerbread-easy/
Worked for me, droid pro on rogers canada(and using a macbook no less!)
Click to expand...
Click to collapse
Thanks, but same issue. Script runs no issue but root apps not working. Terminal Emulator or Root Explorer.
Finally got it to work when it says rebooting you need to unplug the USB cable and manually reboot the phone each time. Wait until the phone fully reboots before plugging the USB back in
Sent from my DROID Pro using XDA App
I've done this several times without success. I've unplugged the phone during the reboot each time and waited for it to fully boot up before plugging it in.
What am I missing?
Oke seeing we kinda lost the possibility to use DDMS for screenshots in recovery on latest HTC Devices.
There had to be another way to do this so after few hours of google and making a few bat tests here it is.
I made a zipp (easy run me bat included) containing all the stuff needed to make screenshots in recovery.
Basically its easy and it makes use of files from this open source project http://code.google.com/p/android-fb2png/ by Kyan He
I did not write fb2png, my little script is just using it to make the shots.
Download screenshot.rar
Extract it and run the screenshot_run_me bat file.
All the bat does is running the following commands
Code:
[COLOR=Black]@[/COLOR]@echo off
cls
echo.
echo ******************************************************
echo * *
echo * ADB-Screenshot from Recovery *
echo * *
echo * Original idea: Kyan He *
echo * code.google.com/p/android-fb2png *
echo * *
echo * Script: Whiskey103 *
echo * forum.xda-developers.com/showthread.php?p=40260716 *
echo * *
echo * Script update: Korbeny *
echo * *
echo * ADB version: 1.0.31 (August 2013) *
echo * *
echo * Instructions: *
echo * - Boot into recovery *
echo * - Plug in USB cable *
echo * When ready press a key to continue *
echo * *
echo ******************************************************
echo.
pause
cls
adb devices
goto option
:option
cls
echo.
echo.
echo.
echo 1.- Make a screenshot
echo 2.- Exit
echo.
set /p choice=Type the number of your choice
if not '%choice%'=='' set choice=%choice:~0,1%
if '%choice%'=='1' goto screenshot
if '%choice%'=='2' goto exit
cls
echo.
echo.
echo.
echo "%choice%" is not a valid option. Please try again
echo.
echo.
pause
goto option
:screenshot
cls
adb shell mount /data
adb push fb2png /data/local/
adb push dump /data/local/
adb shell chmod 755 /data/local/fb2png
adb shell chmod 755 /data/local/dump
adb shell /data/local/dump
adb pull /data/local/ScreenShots
adb shell rm /data/local/fb2png
adb shell rm /data/local/dump
adb shell rm -r /data/local/ScreenShots
echo.
echo.
echo ******************************************************
echo * *
echo * The screenshot was taken successfully *
echo * *
echo ******************************************************
echo.
echo.
adb shell sync
adb shell umount /data
pause
goto option
:exit
cls
echo.
echo.
echo.
echo ******************************************************
echo * *
echo * The screenshots are stored in the ADB folder *
echo * named as Screenshot_date_time.png *
echo * *
echo ******************************************************
echo.
echo.
pause
exit
But its very useful for example TWRP Themers to show their work without the hassle of using a camcorder or other cam.
Or making screenshots in Aroma, posting recovery script errors, Aroma guides etc. etc.
{
"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"
}
Screenshots are now named/tagged with timestamps huge thx to @Patrics83 (RomCleaner author and scripting expert)
Updated script for making multiple screenshots in one cmd session thanks to @korbeny.
Sneakyghost said:
Maybe for future reference: if you want to decipher what settings to use to decode your Fb0, Gimp's file open dialogue is a huge help as it has some sliders to play with values while it displays the changes in realtime. @Behold_this pointed that out to me while i was searching for the right settings to shoot screenies of the older twrp (using rgb565). Later finding out about what RGB8888 means to ffmpeg was a hitch then when TWRP updated to the new pxl format.
See my pains here: DarkViper TWRP Theme (qHD) using this as a little advertiser too, maybe someone wants to grab my theme and port it to your resolution...
Click to expand...
Click to collapse
And here is a few output samples
Disclaimer: Everybody can use my work without asking permission, all my stuff comes with a "sharing is caring" xda philosophy licence... just credits would be nice
Holy macaroni!
Nice work mate! :thumbup::thumbup:
Works perfect on my HTC One X
Sent from my HTC One X
How does this work!? I'm not able to get this to work with my HTC EVO 4G LTE, it says that the fb2png doesn't exist....
Code:
***********************************************
*
* ADB-Screenshot Util
* If in Recovery: Mount System
* Plug In USB Cable
* Enjoy ;)
*
***********************************************
Press any key to continue . . .
push fb2png /data/local/
failed to copy 'fb2png' to '/data/local/': Is a directory
.
shell chmod 755 /data/local/fb2png
chmod: /data/local/fb2png: No such file or directory
.
shell /data/local/fb2png /data/local/fbdump.png
/sbin/sh: /data/local/fb2png: not found
.
pull /data/local/fbdump.png
remote object '/data/local/fbdump.png' does not exist
.
***********************************************
*
* You will find screenshot in adb folder
* named as fbdump.png
*
***********************************************
Press any key to continue . . .
I remember you told me that it works yeeears ago
Not bad
EVOuser94 said:
How does this work!? I'm not able to get this to work with my HTC EVO 4G LTE, it says that the fb2png doesn't exist....
Code:
***********************************************
*
* ADB-Screenshot Util
* If in Recovery: Mount System
* Plug In USB Cable
* Enjoy ;)
*
***********************************************
Press any key to continue . . .
push fb2png /data/local/
failed to copy 'fb2png' to '/data/local/': Is a directory
.
shell chmod 755 /data/local/fb2png
chmod: /data/local/fb2png: No such file or directory
.
shell /data/local/fb2png /data/local/fbdump.png
/sbin/sh: /data/local/fb2png: not found
.
pull /data/local/fbdump.png
remote object '/data/local/fbdump.png' does not exist
.
***********************************************
*
* You will find screenshot in adb folder
* named as fbdump.png
*
***********************************************
Press any key to continue . . .
Click to expand...
Click to collapse
Hum, works for me on One X, can't think of a reason why it wouldn't work on other devices.
You get some specific error?
Sent from my HTC One X using xda premium
I'm going to try a few things then get back at you. them are the only errors that I have as of yet.
Euphorie said:
I remember you told me that it works yeeears ago
Not bad
Click to expand...
Click to collapse
well DDMS from the android sdk worked for ages... just as of late google/htc decided to not support it in custom recovery.
so we got stuck with ugly screenshots of recovery themes.
Or it was a double work thingy.. port your theme into a device that had DDMS support and take shots there
EVOuser94 said:
I'm going to try a few things then get back at you. them are the only errors that I have as of yet.
Click to expand...
Click to collapse
Well I was able to get it to work, but the picture is not working correctly any ideas?
Sent from my EVO using xda premium
EVOuser94 said:
Well I was able to get it to work, but the picture is not working correctly any ideas?
View attachment 1881757
Sent from my EVO using xda premium
Click to expand...
Click to collapse
can you try this version?
https://www.dropbox.com/s/1d5p00y0qp00nh1/fb2png-0.0.2
just rename it into fb2png and replace the old version.
Work great! thank
But,I have manually mounted /data
why you not use command "adb shell mount /data" in your script?
migascalp said:
Work great! thank
But,I have manually mounted /data
why you not use command "adb shell mount /data" in your script?
Click to expand...
Click to collapse
Actually, a good idea tbh.. Didn't think about that..
Sent from my HTC One X using xda premium
I'm getting this with that newer version.
Code:
***********************************************
*
* ADB-Screenshot Util
* If in Recovery: Mount System
* Plug In USB Cable
* Enjoy ;)
*
***********************************************
Press any key to continue . . .
push fb2png /data/local/
2167 KB/s (34628 bytes in 0.015s)
.
shell chmod 755 /data/local/fb2png
.
shell /data/local/fb2png /data/local/fbdump.png
link_image[1891]: 325 could not load needed library 'libutils.so' for '/data/l
ocal/fb2png' (link_image[1891]: 325 could not load needed library 'libcorkscre
w.so' for 'libutils.so' (reloc_library[1306]: 325 cannot locate 'tgkill'...
))CANNOT LINK EXECUTABLE
.
pull /data/local/fbdump.png
remote object '/data/local/fbdump.png' does not exist
.
***********************************************
*
* You will find screenshot in adb folder
* named as fbdump.png
*
***********************************************
Press any key to continue . . .
My mod:
Code:
@echo off
echo ***********************************************
echo *
echo * ADB-Screenshot Util
echo * If in Recovery: Mount System
echo * Plug In USB Cable
echo * Enjoy ;)
echo *
echo ***********************************************
echo.
rem pause
adb shell mount /data
echo push fb2png /data/local/
adb push fb2png /data/local/
echo .
echo shell chmod 755 /data/local/fb2png
adb shell chmod 755 /data/local/fb2png
echo .
echo shell /data/local/fb2png /data/local/fbdump.png
adb shell /data/local/fb2png /data/local/fbdump.png
echo .
echo pull /data/local/fbdump.png
adb pull /data/local/fbdump.png
echo .
echo ***********************************************
echo *
echo * You will find screenshot in adb folder
echo * named as fbdump.png
echo *
echo ***********************************************
echo.
adb shell sync
adb shell umount /data
pause
Work for me
thank you again
Whiskey103 said:
Hum, works for me on One X, can't think of a reason why it wouldn't work on other devices.
You get some specific error?
Sent from my HTC One X using xda premium
Click to expand...
Click to collapse
Don't work for me on One X!
---------- Post added at 10:25 AM ---------- Previous post was at 10:09 AM ----------
519ljh said:
Don't work for me on One X!
Click to expand...
Click to collapse
push fb2png /data/local/
failed to copy 'fb2png' to '/data/local/': Is a directory
.
shell chmod 755 /data/local/fb2png
chmod: /data/local/fb2png: No such file or directory
.
shell /data/local/fb2png /data/local/fbdump.png
/sbin/sh: /data/local/fb2png: not found
.
pull /data/local/fbdump.png
remote object '/data/local/fbdump.png' does not exist
.
***********************************************
*
* You will find screenshot in adb folder
* named as fbdump.png
*
519ljh said:
Don't work for me on One X!
---------- Post added at 10:25 AM ---------- Previous post was at 10:09 AM ----------
push fb2png /data/local/
failed to copy 'fb2png' to '/data/local/': Is a directory
.
shell chmod 755 /data/local/fb2png
chmod: /data/local/fb2png: No such file or directory
.
shell /data/local/fb2png /data/local/fbdump.png
/sbin/sh: /data/local/fb2png: not found
.
pull /data/local/fbdump.png
remote object '/data/local/fbdump.png' does not exist
.
***********************************************
*
* You will find screenshot in adb folder
* named as fbdump.png
*
Click to expand...
Click to collapse
Try to edit the .bat file to mount the /data first before anything else takes place. Look at the post above yours, he shows how to mount the data
Sent from my EVO using xda premium
EVOuser94 said:
Try to edit the .bat file to mount the /data first before anything else takes place. Look at the post above yours, he shows how to mount the data
Sent from my EVO using xda premium
Click to expand...
Click to collapse
THX !I made it!
Added mount commands in script.
Just redownload the package.
Sent from my HTC One X using xda premium
thanks Whiskey
works perfect
Whiskey any idea what could be going on with the EVO 4G LTE not working with this? I'm still unable to use this
Sent from my EVO using xda premium
EVOuser94 said:
Whiskey any idea what could be going on with the EVO 4G LTE not working with this? I'm still unable to use this
Sent from my EVO using xda premium
Click to expand...
Click to collapse
Well honestly no idea. Only thing i can come up with is that you are using stuff posted in one x section on your EVO 4G LTE
But i think it needs different parameters inside fb2png
Jotha is kinda facing the same on HTC One. Scrambled shots.
But i will try to dig into it, problem is there is not much information on who wrote fb2png so can be difficult to gather more settings/parameters etc.
Sent from my HTC One X using xda premium
I've seen lots of people saying its not possible to make the shield an all in one solution for downloading, but after hours of tinkerering I've got a semi easy way of running the above services (and tons more) from the shield. This does requrie a bit of command line-fu , but I think I've got most of the hard work done. When its all said and done, we'll have a working entware-ng installation ( https://github.com/Entware-ng/Entware-ng)
--This guide is a work in progress, there are a few other items I'll add that will improve user experience, but as it stands now it should work as intended. I also haven't gotten a samba config to work yet, so if anyone can figure it out, let me know and I'll update a section on it
I've addapted this guide from a few github projects , but that likely means some commands/steps are actually useless on the shield:
https://github.com/erichlf/AndroidSeedBox
(will add other sources later)
AS ALWAYS MAKE A BACKUP OF DATA -- I AM NOT RESPONSIBLE IF YOUR DEVICE LOSES DATA (to my knowledge, there is no risk of bricking your device doing this, at worst a factory reset/reflash)
Pre-reqs:
Shield has to have ROOT
ADB set up on PC
Busybox : http://www.apkmirror.com/apk/jrummy-apps-inc/busybox-for-android/
Rom Toolbox Lite : Not on apk mirror, so side load from your favorite place
For this process, I recommend having your shield next to your computer, and share inputs with your monitor. You can do 90% of it from an ADB shell, but a few parts you will need to use a terminal on the shield itself, and keyboard is way easier than controller
Install Busybox on the shield, but use the oldest version available (I think the wget for 1.26 messes with the process)
run "ADB Shell" and run these commands on the shield (You can copy/paste multiple lines into the cmd window):
Code:
su
mount -o rw,remount /
ls /data/entware-ng >/dev/null 2>&1 || mkdir /data/entware-ng
cd .; ln -s /data/entware-ng /opt
ls /data/entware-ng/rootbin >/dev/null 2>&1 || mkdir /data/entware-ng/rootbin
cd .; ln -s /data/entware-ng/rootbin /bin
ls /data/entware-ng/rootlib >/dev/null 2>&1 || mkdir /data/entware-ng/rootlib
cd .; ln -s /data/entware-ng/rootlib /lib
ls /data/entware-ng/tmp >/dev/null 2>&1 || mkdir /data/entware-ng/tmp
cd .; ln -s /data/entware-ng/tmp /tmp
ls /data/entware-ng/home >/dev/null 2>&1 || mkdir /data/entware-ng/home
ls /data/entware-ng/home/root >/dev/null 2>&1 || mkdir /data/entware-ng/home/root
ls /data/entware-ng/home/user >/dev/null 2>&1 || mkdir /data/entware-ng/home/user
chmod 0755 /data/entware-ng/home/root
chown root.root /data/entware-ng/home/root
chmod 0755 /data/entware-ng/home/user
We've set up our staging area, and created a new home directory.
Now lets install Entware
Code:
ls /data/entware-ng/bin >/dev/null 2>&1 || mkdir /data/entware-ng/bin
ls /data/entware-ng/lib >/dev/null 2>&1 || mkdir /data/entware-ng/lib
ln -s /system/bin/sh /bin/sh
wget http://pkg.entware.net/binaries/armv7/installer/entware_install.sh -O /data/entware-ng/entware_install.sh
sh /data/entware-ng/entware_install.sh
Now lets install a new Busybox and Wget
Code:
/opt/bin/opkg install busybox
/opt/bin/opkg install wget
cd /bin; ln -s /data/entware-ng/bin/busybox sh
cd /bin; ln -s /data/entware-ng/bin/busybox echo
cd /bin; ln -s /data/entware-ng/bin/busybox rm
cd /bin; ln -s /data/entware-ng/bin/busybox rmdir
cd /bin; ln -s /data/entware-ng/bin/busybox sed
cd /bin; ln -s /data/entware-ng/bin/busybox mkdir
cd /bin; ln -s /data/entware-ng/bin/busybox head
cd /bin; ln -s /data/entware-ng/bin/busybox sort
cd /bin; ln -s /data/entware-ng/bin/busybox dirname
cd /bin; ln -s /data/entware-ng/bin/busybox ln
cd /bin; ln -s /data/entware-ng/bin/busybox mv
cd /bin; ln -s /data/entware-ng/bin/busybox cat
cd /bin; ln -s /data/entware-ng/bin/busybox chown
cd /bin; ln -s /data/entware-ng/bin/busybox chmod
cd /bin; ln -s /data/entware-ng/bin/busybox pgrep
This next step may be optional. Sets up resolv.conf (which may already exist, I'm not sure) and mtab (I don't know what this is)
Code:
echo nameserver 8.8.8.8 >/data/entware-ng/etc/resolv.conf
ls /etc >/dev/null 2>&1 || mkdir /etc
mount -o rw,remount /system
ls /etc/resolv.conf >/dev/null 2>&1 && rm /etc/resolv.conf
cd .; ln -s /data/entware-ng/etc/resolv.conf /etc/resolv.conf
cd .; ln -s /proc/mounts /etc/mtab
Create Passwd file
Code:
echo root:x:0:0:root:/opt/home/root:/bin/sh >/data/entware-ng/etc/passwd
echo shell:x:2000:2000:shell:/opt/home/user:/bin/sh >>/data/entware-ng/etc/passwd
cd .; ln -s /data/entware-ng/etc/passwd /etc/passwd
echo root:x:0:root >/data/entware-ng/etc/group
echo shell:x:2000:shell >>/data/entware-ng/etc/group
cd .; ln -s /data/entware-ng/etc/group /etc/group
echo /bin/sh > /etc/shells
echo PATH=/usr/bin:/usr/sbin:/bin:/sbin:/system/sbin:/system/bin:/system/xbin:/system/xbin/bb:/data/local/bin > /etc/profile
echo export PATH >> /etc/profile
OPTIONAL: If you want to use Open SSH with password instead of certs you can do the following step. I have done this, and haven't noticed any issues, but it may lessen the security of Root
Code:
/data/entware-ng/bin/busybox passwd root
Now let's create a script that will initialize Entware-ng after reboot
Code:
echo \#\!/system/bin/sh > /data/entware-ng/entware-init.sh
echo mount -o rw,remount rootfs / >> /data/entware-ng/entware-init.sh
echo ln -s /data/entware-ng /opt >> /data/entware-ng/entware-init.sh
echo ln -s /data/entware-ng/rootlinb /lib >> /data/entware-ng/entware-init.sh
echo ln -s /data/entware-ng/rootbin /bin >> /data/entware-ng/entware-init.sh
echo ln -s /data/entware-ng/tmp /tmp >> /data/entware-ng/entware-init.sh
echo ln -s /system/bin/sh /bin/sh >> /data/entware-ng/entware-init.sh
echo mount -o ro,remount rootfs >> /data/entware-ng/entware-init.sh
chmod 755 /data/entware-ng/entware-init.sh
Now lets create a start script that calls the initialize script we just made, but also returns a shell in the new environment
Code:
echo \#\!/system/bin/sh > /data/entware-ng/start.sh
echo ls '/opt >/dev/null 2>&1 ||' su -c /data/entware-ng/entware-init.sh >> /data/entware-ng/start.sh
echo export PATH=/opt/sbin:/opt/bin:/opt/rootbin:/opt/local/bin:/system/bin >> /data/entware-ng/start.sh
echo if busybox test $(busybox id -u) = 0; then HOME=/opt/home/root; else HOME=/opt/home/user; fi >> /data/entware-ng/start.sh
echo export HOME >> /data/entware-ng/start.sh
echo '/opt/etc/init.d/rc.unslung start' >> /data/entware-ng/start.sh
echo /bin/sh >> /data/entware-ng/start.sh
chmod 755 /data/entware-ng/start.sh
Now, lets install different services. These are optional, and there are tons more, but this will get transmission/sickbeard/ssh going
Code:
PATH=/data/entware-ng/bin:/bin /data/entware-ng/bin/opkg install vim
PATH=/data/entware-ng/bin:/bin /data/entware-ng/bin/opkg install samba36-server
PATH=/data/entware-ng/bin:/bin /data/entware-ng/bin/opkg install transmission-web transmission-daemon-openssl
PATH=/data/entware-ng/bin:/bin /data/entware-ng/bin/opkg install python
PATH=/data/entware-ng/bin:/bin /data/entware-ng/bin/opkg install python-setuptools
PATH=/data/entware-ng/bin:/bin /data/entware-ng/bin/opkg install python-pip
PATH=/data/entware-ng/bin:/bin /data/entware-ng/bin/opkg install python-cheetah
PATH=/data/entware-ng/bin:/bin /data/entware-ng/bin/opkg install openssh-server
Copy the start.sh and sysinit to the home environment
Code:
cp /data/entware-ng/start.sh /data/entware-ng/home/root/start.sh
cp /data/entware-ng/start.sh /data/entware-ng/home/root/sysinit
chown root.root /data/entware-ng/home/root/start.sh
chmod 755 /data/entware-ng/home/root/start.sh
chown root.root /data/entware-ng/home/root/sysinit
chmod 755 /data/entware-ng/home/root/sysinit
mount -o ro,remount /
mount -o ro,remount /system
Start the new environment
Code:
sh /data/entware-ng/home/root/sysinit
SICKBEARD CONIG
Install a few pre-reqs for sickbeard
Code:
pip install transmissionrpc
pip install cherrypy
Create a file in init.d to allow sickbeard to start on reboot. Please note, you will need to change the path to where your sickbeard directory is.
I'm not going to cover setting up sickbeard, there are other guides for that. I did find that it couldn't be bound to 0.0.0.0 , or local host, it needed to be hard coded for the shields IP, so I recommend setting it up as a static IP in your router.
Code:
echo PATH=/opt/bin:/opt/sbin:$PATH > /opt/etc/init.d/S96sickbeard
echo /opt/bin/python <YOUR PATH TO>/SickBeard.py -d --port 8081 >> /opt/etc/init.d/S96sickbeard
chmod 755 /opt/etc/init.d/S96sickbeard
chmod +x /opt/etc/init.d/S96sickbeard
OPENSSH CONFIG
OPTIONAL - If you want to use SSH we need to generate keys
Code:
ssh-keygen -f /opt/etc/ssh/ssh_host_rsa_key -N '' -t rsa
ssh-keygen -f /opt/etc/ssh/ssh_host_dsa_key -N '' -t dsa
ssh-keygen -f /opt/etc/ssh/ssh_host_ecdsa_key -N '' -t ecdsa -b 521
Now you'll have to get on the shield and use a terminal emulator to edit your sshd_config file. Here's a copy of mine, but I do not promise how secure it is.
Code:
# $OpenBSD: sshd_config,v 1.99 2016/07/11 03:19:44 tedu Exp $
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin:/opt/bin
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options override the
# default value.
Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::
# The default requires explicit activation of protocol 1
Protocol 2
# HostKey for protocol version 1
#HostKey /opt/etc/ssh/ssh_host_key
#HostKeys for protocol version 2
HostKey /opt/etc/ssh/ssh_host_rsa_key
HostKey /opt/etc/ssh/ssh_host_dsa_key
HostKey /opt/etc/ssh/ssh_host_ecdsa_key
#HostKey /opt/etc/ssh/ssh_host_ed25519_key
# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 1024
# Ciphers and keying
#RekeyLimit default none
# Logging
#SyslogFacility AUTH
#LogLevel INFO
# Authentication:
#LoginGraceTime 2m
PermitRootLogin yes
StrictModes no
#MaxAuthTries 6
#MaxSessions 10
#RSAAuthentication yes
#PubkeyAuthentication yes
# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
# but this is overridden so installations will only check .ssh/authorized_keys
AuthorizedKeysFile .ssh/authorized_keys
#AuthorizedPrincipalsFile none
#AuthorizedKeysCommand none
#AuthorizedKeysCommandUser nobody
# For this to work you will also need host keys in /opt/etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes
# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication yes
PermitEmptyPasswords yes
# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes
# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no
# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication. Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
#UsePAM no
#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
#PermitTTY yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
UsePrivilegeSeparation no
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS no
#PidFile /opt/var/run/sshd.pid
#MaxStartups 10:30:100
#PermitTunnel no
#ChrootDirectory none
#VersionAddendum none
# no default banner path
#Banner none
# enable DSCP QoS values (per RFC-4594)
#IPQoS AF21 AF11
# override default of no subsystems
Subsystem sftp /opt/lib/sftp-server
# Example of overriding settings on a per-user basis
#Match User anoncvs
# X11Forwarding no
# AllowTcpForwarding no
# PermitTTY no
# ForceCommand cvs server
To edit this, on the shield (Rom Toolbox Lite has a terminal emulator) run
Code:
su
cd /opt
sh ./start.sh
cd /opt/etc/ssh
vi ./sshd_config
TRANSMISSION
You'll have to configure your transmission settings, but they're located
/opt/etc/transmission/settings.json
Persist after reboot / Start Transmission/SSH/Sickbeard on boot
On the shield, open Rom Toolbox lite, and go down to "Scripter"
Import the sysinit script located /opt/home/root/sysinit and set the script to run at boot as root
Reboot and you should be able to connect via SSH, and have
Why do we need the passwd and group file ? Won't we use android's UID/GID ?
Can this method somehow be used to create custom group where we could put android's UID ?
I don't know why that step is needed, I got it from the guide I listed, and it worked without any apparent issues, so I left it in. My guess is openssh wants it to be there, but I'm not sure
So after you run all that is there a Interface for Sickbeard etc?
ahoslc said:
So after you run all that is there a Interface for Sickbeard etc?
Click to expand...
Click to collapse
It would be running on <shield IP>:8081 which you could access from the shield, or any other device on your network. Transmission would be :9091
Thanks for this. I'm trying to get python3-pip, acd_cli, and encfs installed on my Shield TV so I can mount my Amazon Cloud Drive and decrypt files for use with Plex. I have this set up on my NAS but it is too weak to do transcoding. I did set up the NAS as a middleman and mounted shares from it on the Shield TV, and while it does work, the extra step is really slow.
edit: I managed to get acd_cli working but I cannot mount my Amazon Cloud Drive share, I get I/O errors when I try to cd into it. Wonder if there's a kernel issue.
psycho_asylum said:
Thanks for this. I'm trying to get python3-pip, acd_cli, and encfs installed on my Shield TV so I can mount my Amazon Cloud Drive and decrypt files for use with Plex. I have this set up on my NAS but it is too weak to do transcoding. I did set up the NAS as a middleman and mounted shares from it on the Shield TV, and while it does work, the extra step is really slow.
edit: I managed to get acd_cli working but I cannot mount my Amazon Cloud Drive share, I get I/O errors when I try to cd into it. Wonder if there's a kernel issue.
Click to expand...
Click to collapse
So I was able to get this working https://github.com/dsoprea/GDriveFS and could cd into my google drive (But couldn't get Plex to see any files in the directory)
Soooo, even if you do get it working, its possible Plex won't be able to see it
Edit-- Did you install fuse-utils ?
chasx003 said:
Edit-- Did you install fuse-utils ?
Click to expand...
Click to collapse
Not specifically. I would think it would have been listed as a dependency and automatically installed, libfuse was though. I ended up factory restoring my Shield after I botched something, so now I'm just at 5.1 stock using the built-in Samba for now.
which version of busybox works? I am having trouble with wget and I tried v1.21.0
chasx003 said:
I've seen lots of people saying its not possible to make the shield an all in one solution for downloading, but after hours of tinkerering I've got a semi easy way of running the above services (and tons more) from the shield. This does requrie a bit of command line-fu , but I think I've got most of the hard work done. When its all said and done, we'll have a working entware-ng installation ( https://github.com/Entware-ng/Entware-ng)
[..]
FIRST
Now let's create a script that will initialize Entware-ng after reboot
Code:
echo \#\!/system/bin/sh > /data/entware-ng/entware-init.sh
echo mount -o rw,remount rootfs / >> /data/entware-ng/entware-init.sh
echo ln -s /data/entware-ng /opt >> /data/entware-ng/entware-init.sh
echo ln -s /data/entware-ng/rootlinb /lib >> /data/entware-ng/entware-init.sh
echo ln -s /data/entware-ng/rootbin /bin >> /data/entware-ng/entware-init.sh
echo ln -s /data/entware-ng/tmp /tmp >> /data/entware-ng/entware-init.sh
echo ln -s /system/bin/sh /bin/sh >> /data/entware-ng/entware-init.sh
echo mount -o ro,remount rootfs >> /data/entware-ng/entware-init.sh
chmod 755 /data/entware-ng/entware-init.sh
[..]
SECOND
Now lets create a start script that calls the initialize script we just made, but also returns a shell in the new environment
Code:
echo \#\!/system/bin/sh > /data/entware-ng/start.sh
echo ls '/opt >/dev/null 2>&1 ||' su -c /data/entware-ng/entware-init.sh >> /data/entware-ng/start.sh
echo export PATH=/opt/sbin:/opt/bin:/opt/rootbin:/opt/local/bin:/system/bin >> /data/entware-ng/start.sh
echo if busybox test $(busybox id -u) = 0; then HOME=/opt/home/root; else HOME=/opt/home/user; fi >> /data/entware-ng/start.sh
echo export HOME >> /data/entware-ng/start.sh
echo 'for file in /data/opt/etc/init.d/*' >> /data/entware-ng/start.sh
echo do >> /data/entware-ng/start.sh
echo ' $file start' >> /data/entware-ng/start.sh
echo done >> /data/entware-ng/start.sh
echo /bin/sh >> /data/entware-ng/start.sh
chmod 755 /data/entware-ng/start.sh
[..]
THIRD
Copy the start.sh and sysinit to the home environment
Code:
chown root.root /data/entware-ng/home/root/start.sh
chmod 755 /data/entware-ng/home/root/start.sh
chown root.root /data/entware-ng/home/root/sysinit
chmod 755 /data/entware-ng/home/root/sysinit
mount -o ro,remount /
mount -o ro,remount /system
[..]
FOURTH
Start the new environment
Code:
sh /data/opt/home/root/sysinit
Reboot and you should be able to connect via SSH, and have
Click to expand...
Click to collapse
In my quote there has to be something missing between the "first" and "second" steps and the "third" one.. are the two files we've just made the missing files in the home/root directory? Or where they supposed to come from somewhere else?
Also the "fourth" step, there are no /data/opt directory in my installation.
MartiniGM said:
In my quote there has to be something missing between the "first" and "second" steps and the "third" one.. are the two files we've just made the missing files in the home/root directory? Or where they supposed to come from somewhere else?
Also the "fourth" step, there are no /data/opt directory in my installation.
Click to expand...
Click to collapse
Ah! Sorry for not replying until now, life has been busy.
You are correct, there are some typos / things out of order! I'm going to go through this and fix it and will update the OP
I've taken this guide and installed rTorrent (due to superior web client and RSS capability). If anyone needs help on that, I can chime in.
Great tuto !
Working fine one Nvidia Shield TV 2017 with latest update (whithout reboot)
But after reboot I lost /opt and /bin on root :-O
mkdir /opt working fine after mount -o rw,remount /
but if i reboot it disappear
any idea ?
android.stackexchange.com said:
(root) directory is not a persistent filesystem on Android. It's a initramfs, which is packed into the boot image on your device. Although you can remount it with write permissions, changes will always be lost the next time you boot because the original ramdisk will be re-extracted from the boot image on the next boot.
Click to expand...
Click to collapse
So we need to :
$ mkboot boot.img /output-folder
$ cd /output-folder
$ gunzip -c ramdisk | cpio -i
... make some changes in the ramdisk and possibly /output-folder/img_info ...
$ find . | cpio -o -H newc | gzip > newramdisk.cpio.gz
$ cd ..
$ mkboot /output-folder newboot.img
If you're rooted, a better solution is to simply install in a chroot, either using debootstrap or other; you can obtain a nearly complete Linux system this way (init in a chroot is weird, stuff like openssh will still have to be started separately after boot, either manually or by an app/script).
If you're not rooted, you can use proot for simple path redirection; this is how termux installs arch on unrooted devices.
Using either option (chroot, proot) requires having binary files that aren't in a noexec partition; generally this means private app storage, not sdcard that's accessible to other apps. If you're building a chroot, you should be able to include the external/public storage folder in it, however a chroot also requires the partition not be mounted with nodev option.
***Note that I don't actually have a shield TV*** (I'm just interested in getting one) so I can't say if the shield's storage is mounted noexec, but the android data partition generally is. I can, however, verify that the process in general works on Android, however, as I've got two tablets running Lineage/Nougat with chroots, and a stock Moto G6 with archlinux arm in proot. To check for partitions mounted as nodev or noexec, run `mount|TERM=xterm grep --color -E 'nodev|noexec'`. You might check to see if you can use /data/local instead of app's private storage.
For installing BusyBox, *should* be a `busybox --install -s [DIR]` option that copies the binary to the destination, then symlinks applets. This should be simpler than symlinking a bunch of applets manually.
If you want a system-wide BusyBox I recommend stericson busybox: https://play.google.com/store/apps/details?id=stericson.busybox
For a terminal emulator on Android, I highly recommend termux, which is available on Google play and F-Droid. It has support for 256 color, styles, a package manager, Android integration (ie notifications from Linux scripts), boot scripts, widgets, etc: https://play.google.com/store/apps/details?id=com.termux
Another alternative: you can set up user-mode Linux for something closer to virtualization, but I have yet to see any UML binaries for use with Android; this would also make it difficult to run networking and to access files from outside the guest, but will provide a full working system with init support, and would not require root to set up and run--however, I think UML networking requires root and/or kernel support, though, and UML generally requires a disk image much like other virtualization tools. Qemu might be workable instead of UML with fewer issues.
Note that all of these solutions are still running under an Android app, and as such are subject to the android task killer. Not sure if there's any way around this without having something run directly by Android's own init system.
Efreak2004 said:
If you're rooted, a better solution is to simply install in a chroot, either using debootstrap or other; you can obtain a nearly complete Linux system this way (init in a chroot is weird, stuff like openssh will still have to be started separately after boot, either manually or by an app/script).
If you're not rooted, you can use proot for simple path redirection; this is how termux installs arch on unrooted devices.
Using either option (chroot, proot) requires having binary files that aren't in a noexec partition; generally this means private app storage, not sdcard that's accessible to other apps. If you're building a chroot, you should be able to include the external/public storage folder in it, however a chroot also requires the partition not be mounted with nodev option.
***Note that I don't actually have a shield TV*** (I'm just interested in getting one) so I can't say if the shield's storage is mounted noexec, but the android data partition generally is. I can, however, verify that the process in general works on Android, however, as I've got two tablets running Lineage/Nougat with chroots, and a stock Moto G6 with archlinux arm in proot. To check for partitions mounted as nodev or noexec, run `mount|TERM=xterm grep --color -E 'nodev|noexec'`. You might check to see if you can use /data/local instead of app's private storage.
For installing BusyBox, *should* be a `busybox --install -s [DIR]` option that copies the binary to the destination, then symlinks applets. This should be simpler than symlinking a bunch of applets manually.
If you want a system-wide BusyBox I recommend stericson busybox: https://play.google.com/store/apps/details?id=stericson.busybox
For a terminal emulator on Android, I highly recommend termux, which is available on Google play and F-Droid. It has support for 256 color, styles, a package manager, Android integration (ie notifications from Linux scripts), boot scripts, widgets, etc: https://play.google.com/store/apps/details?id=com.termux
Another alternative: you can set up user-mode Linux for something closer to virtualization, but I have yet to see any UML binaries for use with Android; this would also make it difficult to run networking and to access files from outside the guest, but will provide a full working system with init support, and would not require root to set up and run--however, I think UML networking requires root and/or kernel support, though, and UML generally requires a disk image much like other virtualization tools. Qemu might be workable instead of UML with fewer issues.
Note that all of these solutions are still running under an Android app, and as such are subject to the android task killer. Not sure if there's any way around this without having something run directly by Android's own init system.
Click to expand...
Click to collapse
Using chroot isn`t good solution. Emulators not effective too.
Stericon`s busybox is paid, meefik`s busybox is free and has more utils.
Termux is heavy, I use Teeminal Emulator: https://f-droid.org/app/jackpal.androidterm
You be able to install a lot of lightweight linux utils by installing entware-ng. For example, git pkg has 300 Mb size in termux and 15 Mb in entware.
Entware has a lot of conmon with optware and openwrt
this is a wonderful guide I'm surprised more people don't use it great job!