[NST] Root/Market & Setup Script Kit - Nook Touch Android Development

This is a simple guide and script from Start to Finish on how to root and install all needed programs to your Nook Touch. Enjoy If you find anything wrong with my script please let me know but I think I ironed out all the bugs during testing.
Disclaimer: Try not to break anything...and if you do its not my fault. If you think its broke hold the POWER button down for 20+ Seconds to Factory Reset the device.
Requirements:
Nook Simple Touch
WinRAR Archiver
512+MB/GB microSD
External USB/Internal USB Memory Card Reader
Dedicated Wifi Connection with Good/Excellent Signal!
Tweaked/Additions:
Full Superuser Access
Updates are permanently blocked!
Unknown sources Enabled (install non-Market applications)
adb debugging is active [mostly for developers]
Ability to replace the Authors ****ty pictures
Ability to remap the left buttons to Menu & Back
Market Installed & Working! Login to YouTube with your GMAIL!
Software Included:
AdFree (Block those nasty ad's) [Wi-Fi needed]
Button Savior (Displays Softkeys)
gTab simi Clock (really awesome clock for your desktop)
Kindle (read your Kindle books on Nook, lol) [Wi-Fi needed]
LauncherPro (default launcher instead of Nook base launcher)
Superuser (provides a list of applications that use superuser access)
Instructions
Step 1:
Run Win32DiskImager provided in this package. Select your 512MB or larger microSD card under Device. Be certain your microSD card drive letter is selected and not one of your hard drives. Click the little blue folder icon and find the img file “noogie.img”.
Once the image is selected click “Write”.
Step 2:
Safely eject your card and insert it in the nook while it’s completely powered off.
Plug in the USB cable and the light next to the USB plug will blink Green/Orange.
Step 3:
At this point you should see a Forever Rooted screen on the nook. Open Windows Explorer and find the drive labeled “boot”. Take note of the drive letter you will need it later on in the process.
Final Step:
Run xe-autonook.bat and follow the instructions
Code:
echo off
cls
echo.
:root
set /p rooted=Is your Nook touch Rooted yet (yes, no)?
if '%rooted%'=='y' goto :rooted
if '%rooted%'=='yes' goto :rooted
if '%rooted%'=='Y' goto :rooted
if '%rooted%'=='YES' goto :rooted
if '%rooted%'=='N' goto :driveletter
if '%rooted%'=='NO' goto :driveletter
if '%rooted%'=='n' goto :driveletter
if '%rooted%'=='no' goto :driveletter
goto :root
:driveletter
echo.
echo Please make sure your on the Forever Rooted screen!
echo What drive letter is your boot drive?
echo It is labeled as "boot" in Windows Explorer.
set /p bootroot=Please type the Nooks drive letter (ie. d,e,f,g):
if '%bootroot%'=='a' goto :bootroot
if '%bootroot%'=='b' goto :bootroot
if '%bootroot%'=='c' goto :bootroot
if '%bootroot%'=='d' goto :bootroot
if '%bootroot%'=='e' goto :bootroot
if '%bootroot%'=='f' goto :bootroot
if '%bootroot%'=='g' goto :bootroot
if '%bootroot%'=='h' goto :bootroot
if '%bootroot%'=='i' goto :bootroot
if '%bootroot%'=='j' goto :bootroot
if '%bootroot%'=='k' goto :bootroot
if '%bootroot%'=='l' goto :bootroot
if '%bootroot%'=='m' goto :bootroot
if '%bootroot%'=='n' goto :bootroot
if '%bootroot%'=='o' goto :bootroot
if '%bootroot%'=='p' goto :bootroot
if '%bootroot%'=='q' goto :bootroot
if '%bootroot%'=='r' goto :bootroot
if '%bootroot%'=='s' goto :bootroot
if '%bootroot%'=='t' goto :bootroot
if '%bootroot%'=='u' goto :bootroot
if '%bootroot%'=='v' goto :bootroot
if '%bootroot%'=='w' goto :bootroot
if '%bootroot%'=='x' goto :bootroot
if '%bootroot%'=='y' goto :bootroot
if '%bootroot%'=='z' goto :bootroot
if '%bootroot%'=='A' goto :bootroot
if '%bootroot%'=='B' goto :bootroot
if '%bootroot%'=='C' goto :bootroot
if '%bootroot%'=='D' goto :bootroot
if '%bootroot%'=='E' goto :bootroot
if '%bootroot%'=='F' goto :bootroot
if '%bootroot%'=='G' goto :bootroot
if '%bootroot%'=='H' goto :bootroot
if '%bootroot%'=='I' goto :bootroot
if '%bootroot%'=='J' goto :bootroot
if '%bootroot%'=='K' goto :bootroot
if '%bootroot%'=='L' goto :bootroot
if '%bootroot%'=='M' goto :bootroot
if '%bootroot%'=='N' goto :bootroot
if '%bootroot%'=='O' goto :bootroot
if '%bootroot%'=='P' goto :bootroot
if '%bootroot%'=='Q' goto :bootroot
if '%bootroot%'=='R' goto :bootroot
if '%bootroot%'=='S' goto :bootroot
if '%bootroot%'=='T' goto :bootroot
if '%bootroot%'=='U' goto :bootroot
if '%bootroot%'=='V' goto :bootroot
if '%bootroot%'=='W' goto :bootroot
if '%bootroot%'=='X' goto :bootroot
if '%bootroot%'=='Y' goto :bootroot
if '%bootroot%'=='Z' goto :bootroot
goto :driveletter
:bootroot
echo.
echo We are now copying the uRamdisk
ren %bootroot%:\uRamdisk uRamdisk.old
copy .\mods\uRamdisk_rooted %bootroot%:\uRamdisk
echo.
echo *****************************
echo * Unplug you Nook Touch! *
echo * Remove the SD Card! *
echo * Hold Power for 10-15 sec *
echo * Release Power and Turn on *
echo * Nook will boot as normal *
echo *****************************
pause
:rooted
adb kill-server
echo.
echo Please connect the Nook to a Excellent or Good WIFI Signal!
echo While on the Nook press "n" and goto Settings then Wireless and...
echo Click the Wireless Network your connected to and get the IP address.
echo.
set /p ip=Enter the Nooks IP address:
echo.
:start
echo *****************************************
echo * We will now connect to the Nook Touch *
echo *****************************************
adb connect %ip%
echo.
set /p choice=Was the connection successful (yes, no)?
if '%choice%'=='y' goto :connected
if '%choice%'=='yes' goto :connected
if '%choice%'=='Y' goto :connected
if '%choice%'=='YES' goto :connected
if '%choice%'=='N' goto :notconnected
if '%choice%'=='NO' goto :notconnected
if '%choice%'=='n' goto :notconnected
if '%choice%'=='no' goto :notconnected
echo.
goto :start
:connected
echo.
echo *****************************************
echo * We will create the directory .Android *
echo * We will also create the adb_usb.ini *
echo * This is for future USB ADB access *
echo *****************************************
md "%USERPROFILE%\.Android"
echo 0x2080 > "%USERPROFILE%\.Android\adb_usb.ini"
echo Success
echo.
echo ********************************
echo * Enabling non-market installs *
echo ********************************
adb shell mount -o rw,remount -t ext2 /dev/block/mmcblk0p5 /system
adb pull /data/data/com.android.providers.settings/databases/settings.db settings.db
sqlite3 settings.db "update secure set value=1 where name='install_non_market_apps';"
adb push settings.db /data/data/com.android.providers.settings/databases/settings.db
del settings.db
echo Success
echo.
ping -n 2 127.0.0.1 >NUL
echo **********************
echo * Installing SQLite3 *
echo **********************
adb shell mount -o rw,remount -t ext2 /dev/block/mmcblk0p5 /system
adb push ./mods/sqlite3 /system/bin
ping -n 2 127.0.0.1 >NUL
echo Success
echo.
echo ***********************************
echo * Installing Superuser 2.3.6.1-ef *
echo ***********************************
adb shell mount -o rw,remount -t ext2 /dev/block/mmcblk0p5 /system
adb install ./apks/Superuser.apk
adb push ./mods/su /system/bin
adb shell chmod 6755 /system/bin/su
ping -n 2 127.0.0.1 >NUL
echo Success
echo.
echo ************************
echo * Blocking OTA Updates *
echo ************************
adb shell mount -o rw,remount -t ext2 /dev/block/mmcblk0p5 /system
adb pull /data/data/com.bn.devicemanager/databases/devicemanager.db devicemanager.db
sqlite3 devicemanager.db "update registry set value='manual' where name='com.bn.device.fota.mode';"
adb push devicemanager.db /data/data/com.bn.devicemanager/databases/devicemanager.db
del devicemanager.db
ping -n 2 127.0.0.1 >NUL
echo Success
echo.
:qbuttons
set /p choice2=Convert Left Buttons to Back and Menu (yes, no)?
if '%choice2%'=='y' goto :buttons
if '%choice2%'=='yes' goto :buttons
if '%choice2%'=='Y' goto :buttons
if '%choice2%'=='YES' goto :buttons
if '%choice2%'=='N' goto :removebooks
if '%choice2%'=='NO' goto :removebooks
if '%choice2%'=='n' goto :removebooks
if '%choice2%'=='no' goto :removebooks
goto :qbuttons
:buttons
echo.
echo *******************************************
echo * Converting Left Buttons to (Back, Menu) *
echo *******************************************
adb shell mount -o rw,remount -t ext2 /dev/block/mmcblk0p5 /system
adb push ./mods/TWL4030_Keypad.kl /system/usr/keylayout/TWL4030_Keypad.kl
adb shell chmod 644 /system/usr/keylayout/TWL4030_Keypad.kl
ping -n 2 127.0.0.1 >NUL
echo Success
:removebooks
echo.
set /p choice3=Remove Quickstart Guide and Nook Manual from Library (yes, no)?
if '%choice3%'=='y' goto :removeyes
if '%choice3%'=='yes' goto :removeyes
if '%choice3%'=='Y' goto :removeyes
if '%choice3%'=='YES' goto :removeyes
if '%choice3%'=='N' goto :wallpapers
if '%choice3%'=='NO' goto :wallpapers
if '%choice3%'=='n' goto :wallpapers
if '%choice3%'=='no' goto :wallpapers
goto :removebooks
:removeyes
echo.
echo ***************************************
echo * Removing User Guide and Quick Start *
echo ***************************************
adb shell mount -o rw,remount -t ext2 /dev/block/mmcblk0p5 /system
adb shell rm /system/media/books/Quick_Start.epub
adb shell rm /system/media/books/User_Guide.epub
echo Success
echo.
:wallpapers
echo.
set /p choice4=Replace Authors wallpapers with better ones (yes, no)?
if '%choice4%'=='y' goto :replacepapers
if '%choice4%'=='yes' goto :replacepapers
if '%choice4%'=='Y' goto :replacepapers
if '%choice4%'=='YES' goto :replacepapers
if '%choice4%'=='N' goto :keepbooks
if '%choice4%'=='NO' goto :keepbooks
if '%choice4%'=='n' goto :keepbooks
if '%choice4%'=='no' goto :keepbooks
goto :wallpapers
:replacepapers
echo.
echo ********************************************************
echo * Replacing Authors wallpapers with AWESOME wallpapers *
echo ********************************************************
adb shell mount -o rw,remount -t ext2 /dev/block/mmcblk0p5 /system
adb push ./screensaver/authors /system/media/screensaver/authors
echo Success
echo.
:keepbooks
echo.
echo ******************************************
echo * Setting application permissions to 644 *
echo ******************************************
adb shell chmod 644 /system/app/*
ping -n 10 127.0.0.1 >NUL
echo.
echo ***************************
echo * Installing Applications *
echo ***************************
adb install ./apks/com.amazon.kindle-1.apk
adb install ./apks/NookColorTools_0.2.apk
adb install ./apks/com.smart.swkey-1.apk
adb install ./apks/com.bigtincan.android.adfree-1.apk
adb install ./apks/com.rhythm.hexise.uninst-1.apk
adb install ./apks/LauncherPro.apk
adb install ./apks/com.th.android.widget.gTabsimiClock-1.apk
echo.
echo **************************
echo * You Nook is rebooting! *
echo * Wait until rebooted... *
echo * Press the "n" Button *
echo * Select the check box *
echo * Select Launcher Pro *
echo * *
echo * Enjoy! *
echo **************************
adb reboot
adb kill-server
exit
:notconnected
echo.
echo ***********************************************
echo * There was a problem connecting to the Nook *
echo * Your device might not be rooted correctly *
echo * Your device might not be connected wireless *
echo * You might have typed the IP Address wrong *
echo ***********************************************
pause
exit
Once all said and done update your Vending.apk with this one for updated market and WORKING SEARCH
http://forum.xda-developers.com/showpost.php?p=15084704&postcount=51

Nice Job !

jocala said:
Nice Job !
Click to expand...
Click to collapse
Thank you, I put ALOT of effort into the script portion. Its pretty much flawless for what it does.

Nice job. Looks really professional.

Thanks for doing this. Not and ADB expert so this really helped!!

redbluff said:
Thanks for doing this. Not and ADB expert so this really helped!!
Click to expand...
Click to collapse
Your very welcome

Here's my workflow, feel free to use any of it you find useful. Since it's personal code, no error checking, etc. The directory /system/xbin is already in the path, but not present on the device -- I create it. adbWireless is very handy, it allows you to turn adbd off or on, a useful security addition for wifi. bash & busybox aren't required, but can make your life at the console a lot easier.
Code:
xboxexpert asked me to remove my code from his thread. Done.

Nice job!
Nice job, well done..
Only thing - missing pause at the end of the script after reboot and kill-server..

vojcas said:
Nice job, well done..
Only thing - missing pause at the end of the script after reboot and kill-server..
Click to expand...
Click to collapse
It freezes at the end of the script due to rebooting the device...adb doesn't know how to handle wifi reboots so it just crashs dos. It is its own pause...you'll see.

Which part of the script turns off the windows transitions and animations?
(I've done most of these things already, but I'm wondering what you mean by this item)

Xhorder said:
Which part of the script turns off the windows transitions and animations?
(I've done most of these things already, but I'm wondering what you mean by this item)
Click to expand...
Click to collapse
Sorry I deleted that portion from the actual script. I just forgot to update post.

Is the installation of Gapps and Market included in the script?

aruangra said:
Is the installation of Gapps and Market included in the script?
Click to expand...
Click to collapse
Not yet...since you actually have to do some work for that to work.

explorer .....
Im a simple instruction follower type, and every other device "WE" hack ?I fail to find a simple root explorer = way to install APKs, every other device, im like whoot they rooted it .... and then, wrestle with it
-gmail . apk
-dropbox .apk
All FAIL, through given webrowser
PLEASE, a lil how to actually "use" (abuse) a rooted nook?

dinguznomad said:
Im a simple instruction follower type, and every other device "WE" hack ?I fail to find a simple root explorer = way to install APKs, every other device, im like whoot they rooted it .... and then, wrestle with it
-gmail . apk
-dropbox .apk
All FAIL, through given webrowser
PLEASE, a lil how to actually "use" (abuse) a rooted nook?
Click to expand...
Click to collapse
Download my kit. In the main directory there is the adb.exe here are some of the commands laid out for you to utilize
Code:
adb connect IP
Where the IP is is where you put the ip address of the nook. ie. 192.168.1.8
It will connect to the nook and you will be able to type
Code:
adb shell
Verify that # is what you see. type exit to exit adb.
Put any apk files in the directory and then type
Code:
adb install APKFILE.apk
It will install the apk file on your nook.
I hope I helped
adb disconnect (disconnects the nook)
adb kill-server (kills the server and quits all running processes of adb.exe)
adb reboot (reboots the nook if connected)

okeedokey
I was thinking with this I could avoid any manual adb
or
nooktools or superuser had some secret explorer/APK launcher
thanx

Has anyone tried out the Kobo, Sony Reader, or Overdrive apps and had any luck?

Overdrive seems to work just fine...
guitar_east said:
Has anyone tried out the Kobo, Sony Reader, or Overdrive apps and had any luck?
Click to expand...
Click to collapse
I have it installed and it appears to operate correctly. However, I have never used it before. It launches the crippled default browser when connecting to my library and this can be problematic to browse and download content. I would think everything would work smoothly when using an alternative web browser.

Michael.Rose said:
I have it installed and it appears to operate correctly. However, I have never used it before. It launches the crippled default browser when connecting to my library and this can be problematic to browse and download content. I would think everything would work smoothly when using an alternative web browser.
Click to expand...
Click to collapse
Thanks for the response...but I listed 3 apps, which one did you get to try?

Re: Overdrive seems to work just fine...
guitar_east said:
Thanks for the response...but I listed 3 apps, which one did you get to try?
Click to expand...
Click to collapse
Overdrive, I had written it in the subject heading.
I have not tried Kobo or Sony apps.

Related

New 1-click root method

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?

[TOOL][SCRIPT]*** Easy ADB solution for screenshots in recovery HTC ONE X ***

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

HOWTO: Prevent Oppo driver CD from mounting

It annoys the hell out of me when I plug the phone in by USB and it mounts a pointless virtual CD drive with the drivers on. You can disable it on your own PC, but when you plug in to someone else's having it pop up and autoplay the driver installer is often unwelcome. There's probably a better way to do this, but it works for me
Steps:
1) Have root, a working ADB, and backups (nandroid)
2) adb shell
Code:
su
mount -o remount,rw /system
cd /system/etc
cp init.qcom.post_boot.sh init.qcom.post_boot.sh.bak
echo setprop sys.usb.config mtp,adb >> init.qcom.post_boot.sh
If you need to get the cd back temporarily then switch to charge mode and back via the notification area. You'll then be stuck with the CD until the next reboot.
To permanently remove it:
Code:
su
mount -o remount,rw /system
cd /system/etc
cp init.qcom.post_boot.sh init.qcom.post_boot.sh.bak #if you didn't already do this
echo echo \"\" \> /sys/class/android_usb/f_mass_storage/lun/file >> init.qcom.post_boot.sh
echo chmod 440 /sys/class/android_usb/f_mass_storage/lun/file >> init.qcom.post_boot.sh
To get the CD back this time, you will need to run
Code:
chmod 660 /sys/class/android_usb/f_mass_storage/lun/file
then switch to charge-only and back.
Note that chances are you'll want to do this because the only computer you're on doesn't have Oppo ADB drivers installed, so you will have to do this from a terminal emulator, which will not be fun.

[GUIDE] Run Sickbeard/Transmission/sabnzbd/SSH/Samba/More on Shield

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!

Simple batch to send URL and open to Firestick over ADB...

Make this a .bat script. Edit the two lines. Run the file and verify debugging on TV. Copy everything below this.
@Echo off
echo FireStick ADB interface initializing...
REM edit this to abd.exe directory v
cd /d C:\Android\Adb\
adb connect 192.168.x.x
REM Firestick IP here ^
echo.
echo.
echo.
echo.
set /p UserInputPath=What is the URL? (type "exit" to kill adb and exit)
IF "%UserInputPath%"=="exit" (
adb kill-server
exit
)
timeout -t 3
adb shell am start -a android.intent.action.VIEW -d %UserInputPath%
adb kill-server
exit

Categories

Resources