How to get to Android Settings (not BN settings)? - Nook Touch General

I didn't see this anywhere so --
I've got my NST rooted (excellent, thanks to all involved!), but I can't seem to get to the Android Settings.
From the ADW Home screen, the Menu button gives me a Settings option, but it brings me to the BN Settings menu.
Likewise in the App Drawer -- Settings there brings me to the BN settings.
Any help??
Thanks and take care

The stock Settings.apk on Nook has been gutted. There are various tools that replace it.
If you just want to try some of the settings and you have ADB or a terminal on your Nook,
try one of the following commands in a shell:
Code:
am start -n com.android.settings/.BatteryInfo
am start -n com.android.settings/.ChooseLockPin
am start -n com.android.settings/.DevelopmentSettings
am start -n com.android.settings/.Display
am start -n com.android.settings/.deviceinfo.Memory
am start -n com.android.settings/.fuelgauge.PowerUsageSummary
am start -n com.android.settings/.SdCardSettings
am start -n com.android.settings/.Settings_System
Don't set the PIN lock unless you want it!

Thanks very much! Also, could you or someone point me to tool to restore the Settings.apk.
Thanks again
Renate NST said:
The stock Settings.apk on Nook has been gutted. There are various tools that replace it.
If you just want to try some of the settings and you have ADB or a terminal on your Nook,
try one of the following commands in a shell:
Code:
am start -n com.android.settings/.BatteryInfo
am start -n com.android.settings/.ChooseLockPin
am start -n com.android.settings/.DevelopmentSettings
am start -n com.android.settings/.Display
am start -n com.android.settings/.deviceinfo.Memory
am start -n com.android.settings/.fuelgauge.PowerUsageSummary
am start -n com.android.settings/.SdCardSettings
am start -n com.android.settings/.Settings_System
Don't set the PIN lock unless you want it!
Click to expand...
Click to collapse

curt_k said:
[...] I've got my NST rooted (excellent, thanks to all involved!), but I can't seem to get to the Android Settings.
From the ADW Home screen, the Menu button gives me a Settings option, but it brings me to the BN Settings menu.
Click to expand...
Click to collapse
Any Cut will let you create shortcuts to many settings screens on your launcher home screen. Be aware that some of them can be destructive.

curt_k said:
Also, could you or someone point me to tool to restore the Settings.apk.
Click to expand...
Click to collapse
I realize that this thread is way old and you likely don't have the problem anymore/found this already, but nook color tools will give you access to a lot more settings. Yes, it works on the nook touch too.

Related

[REQ] Need someone to check something for me on a STOCK Legend

Anyone out there willing to help me out?
I just someone to run this command with their phone hooked up, USB Debugging ENABLED:
adb shell ls -l -R /sys/class > class_structure_LEGEND.txt
This will output a text file in whichever directory you run the command from, that will list the hardware capabilities of the phone for me - this would help me IMMENSELY from a development standpoint!
Check out the text file - zero personal / private information will be in there!
Thanks!
also need...
adb shell ls -l -R /sys/devices/platform > platform_structure_LEGEND.txt
and
adb shell ls -l -R /sys/devices/virtual > virtual_structure_LEGEND.txt
If you guys don't mind taking a moment
Here it is. FW - rooted original 2.03, will it do?
Definitely! Do you mind running that 2nd command again? (the virtual one)
I didn't mean to put the same command in twice, LOL!
Also, the -R MUST be capitalized! I'm afraid your logs weren't much help without that
Oops Here are the right ones
Firecold said:
Oops Here are the right ones
Click to expand...
Click to collapse
Thanks!! 10char

[Q] Syslog for Android?

I'm trying to start busybox's httpd at boot w/o success. However, I can start it manually post-boot w/o problems. Can I enable a syslog facility so I can see what happens when the bootup script calls it?
Code:
httpd -p 80 -u 80 -h /sdcard/www -c /etc/httpd.conf
I've tried running the process as -u 80 and as -u 0, both work post-boot, not before.
It's Linux - if there is an rc.local you should be able to drop a string in there to make it start.
KaiserLinux said:
It's Linux - if there is an rc.local you should be able to drop a string in there to make it start.
Click to expand...
Click to collapse
Not that simple
There is no rc.local, but I inserted
Code:
/sbin/syslogd -O /data/log/syslog
into the beginning of init.rc, but it logs nothing.
Go into applications and turn on debugging mode. Plug your phone into your computer and run 'adb logcat' or something to that effect. You can play around with your phone and watch the log scroll by.
Your gonna need the whole ADB setup. Go to the samsung epic 4G wiki and check the article about getting root and flashing a new kernel. This will have the instructions for getting ADB on your system as well.
KaiserLinux said:
Go into applications and turn on debugging mode. Plug your phone into your computer and run 'adb logcat' or something to that effect. You can play around with your phone and watch the log scroll by.
Your gonna need the whole ADB setup. Go to the samsung epic 4G wiki and check the article about getting root and flashing a new kernel. This will have the instructions for getting ADB on your system as well.
Click to expand...
Click to collapse
I've compiled my own rooted kernel and a new busybox with syslogd to see if I can diagnose why bb's httpd isn't starting at boot. As I mentioned, it starts manually w/o a problem. adb logcat isn't very useful in this particular situation. Thanks for the reply though.
jocala said:
There is no rc.local, but I inserted
Code:
/sbin/syslogd -O /data/log/syslog
into the beginning of init.rc, but it logs nothing.
Click to expand...
Click to collapse
I'm kind of a noob myself, but I recall reading that init.rc isn't really a shell script. It has a special syntax that is parsed by Android init, I'm not sure just throwing shell commands in there is going to work. I'd post a link to the doc but I can't post links yet
coldguy said:
I'm kind of a noob myself, but I recall reading that init.rc isn't really a shell script. It has a special syntax that is parsed by Android init, I'm not sure just throwing shell commands in there is going to work. I'd post a link to the doc but I can't post links yet
Click to expand...
Click to collapse
Weird, the first 500 lines of init.rc are nothing BUT shell commands.
i.e. chmod 0666 /dev/input/event0
Anyway, further along in init.rc the daemon processes are started up. syntax looks like:
Code:
service playlogo /system/bin/playlogo
user root
oneshot
I've tried setting up my programs (httpd,syslogd) as services, no joy.
jocala said:
Not that simple
There is no rc.local, but I inserted
Code:
/sbin/syslogd -O /data/log/syslog
into the beginning of init.rc, but it logs nothing.
Click to expand...
Click to collapse
sorry to hijack your post.
but i want to know how do you modify the /init.rc,
because when i reboot, the /init.rc will automatic recovery the old verison.
did you check the /init.rc, is it modified, after your phone reboot?
Does logcat not give you the info you want?
You can go here to find out how to redirect stdout and stderr to the logcat as well.
init.rc is part of the root fs, which is compiled into the kernel. So, a custom kernel is required. Search for custom kernel for details.

[REF] Making use of Windows "Send to" menu

Pushing files over adb has never been easy. There are some external tools for sending files over adb, but I like native, Windows-integrated ones.
The trick is extremely easy. It works with adbWireless and similar applications. It could work with USB connection too, but I rarely use it.
HEADS UP: Be sure to check all nice(r) scripts by Daneshm90 down the thread!
Prerequisites:
-adb
-adbMagic or similar for wifi connection, none for USB only.
How to?
For better look you will need two files:
adb_send.cmd;
Code:
adb connect 192.168.1.103
adb push %1 /sdcard/
pause
and a shortcut to it, where you can customize icon and name.
1) create your adb_send.cmd anywhere on disk (I put mine in android-sdk-windows\tools directory),
2) customize the ip address, to point at your device (I have router with static DHCP, so everytime my device connects it leases the same address)
3) then go to:
Windows Vista/7:
Code:
%APPDATA%\Microsoft\Windows\SendTo
(paste it in explorer's address bar, or hit WIN+R and paste there, Enter), and place shortcut to script file created earlier. (drag it with right mouse button)
4) customize the icon and name of the shortcut
Next time you click on any file menu appears:
good idea, btw how did you find the ip address? 192.168.1.103... i am not able to send using the same
When you use adbWireless, under big orange button you will see something like: "adb connect 192.168.1.103:5555"
ravi4chahal said:
good idea, btw how did you find the ip address? 192.168.1.103... i am not able to send using the same
Click to expand...
Click to collapse
I think that you will have to find your own ip adress mate
xan said:
When you use adbWireless, under big orange button you will see something like: "adb connect 192.168.1.103:5555"
Click to expand...
Click to collapse
ok thanks, I installed adbWireless and now it is working ... however is there any way of getting rid of the CMD window that pops up while transfer?
hmm..
I think there is. Right click on the shortcut (this in "%APPDATA%\Microsoft\Windows\SendTo")properities -> run -> minimised
Delete "pause" line from script, and command line is hidden.
//double, sry
How's this :
Code:
@echo off
echo Where to push the file ? eg (/data/1.apk)
SET /P pat=Enter :
echo Pushing...
adb push "%1" /sdcard/%~n1
adb shell su -c "cp /sdcard/%~n1 %pat%" -root
adb shell rm /sdcard/%~n1
echo Done
It works directly for me.
Right click the file, Send to - > Bluetooth Devices.
Select my Phone and press Send.
Very cool tip, made a couple different cmd shortcuts to copy to different part of the sdcard(roms/apps/misc).
peachpuff said:
Very cool tip, made a couple different cmd shortcuts to copy to different part of the sdcard(roms/apps/misc).
Click to expand...
Click to collapse
The script i posted above does just that except you don't need multiple shortcuts.
When you run it'll as you where u want the file to go.
Thanks for the tip.
And Daneshm90 i tried your command, but..is there a way to do it without su? Since when i try ur command i always have to accept the root request, and it dosnt seem to push the file right anyway. So im asking is there a way to do it without su? Cuz if i do the original i dont need to press the root request all the time.
Thanks in advance mate.
borgen92 said:
Thanks for the tip.
And Daneshm90 i tried your command, but..is there a way to do it without su? Since when i try ur command i always have to accept the root request, and it dosnt seem to push the file right anyway. So im asking is there a way to do it without su? Cuz if i do the original i dont need to press the root request all the time.
Thanks in advance mate.
Click to expand...
Click to collapse
It should only ask you to accept once, not everytime.
Well sure i can modify mine where if u say /sdcard/ then it doesn't do that whole root crap and just pushes to sdcard.
Gimme a few.
Daneshm90 said:
It should only ask you to accept once, not everytime.
Well sure i can modify mine where if u say /sdcard/ then it doesn't do that whole root crap and just pushes to sdcard.
Gimme a few.
Click to expand...
Click to collapse
Thanks alot man, you'r awesome
Here try this one
Code:
@echo off
echo Where to push the file ? eg (/data/1.apk)
SET /P pat=Enter :
if not "%pat:sdcard=%"=="%pat%" goto sdcard
echo Pushing...
adb push %1 /sdcard/%~n1
adb shell su -c "cp /sdcard/%~n1 %pat%" -root
adb shell rm /sdcard/%~n1
echo Done
:sdcard
echo Pushing...
adb push %1 %pat%
echo Done
Note, if you have a rom where when you do "adb shell" and ur automatically in "su" mode. Then u can simply change the script to :
Code:
@echo off
echo Where to push the file ? eg (/data/1.apk)
SET /P pat=Enter :
echo Pushing...
adb push %1 %pat%
echo Done
flawless!!!!
Thank you!
Does this require root?
Daneshm90 said:
Here try this one
Code:
@echo off
echo Where to push the file ? eg (/data/1.apk)
SET /P pat=Enter :
if not "%pat:sdcard=%"=="%pat%" goto sdcard
echo Pushing...
adb push %1 /sdcard/%~n1
adb shell su -c "cp /sdcard/%~n1 %pat%" -root
adb shell rm /sdcard/%~n1
echo Done
:sdcard
echo Pushing...
adb push %1 %pat%
echo Done
Note, if you have a rom where when you do "adb shell" and ur automatically in "su" mode. Then u can simply change the script to :
Code:
@echo off
echo Where to push the file ? eg (/data/1.apk)
SET /P pat=Enter :
echo Pushing...
adb push %1 %pat%
echo Done
Click to expand...
Click to collapse
thats awesome, how would one make it crate and copy the folder structure as well? did this with a folder with pics in it and it just put every pic on the root of my sd card.
or how about asking for ip then using what was imputed?
Send To Menu For ADB Install
You can modify the above instructions to use the Send to Menu to install applications over wireless.
Code:
adb connect 192.168.1.46:5555
adb install %1
pause
Substitute your IP address for 192.168.1.46 (may or may not need the port)
Save your Install.cmd or anything.cmd anywhere on your hardisk. Make a shortcut in
Code:
%APPDATA%\Microsoft\Windows\SendTo
to the .cmd.
Right click an .apk and select Send To -> Install.cmd
Works like a dream using my Nexus 1 and adbWireless
nice one @wacckkoo1
this has so much potential.
i found an app on the market called ADB over WIFI widget. it dosent care if your connected to wifi or not, it will just start, making this possable to do while wireless tethering to a laptop
thats why im wanting to know how i can get it to ask for ip address because it wont always be the same.

Locking the screen

Hi all,
I rooted my Nook Simple Touch via TouchNooter 2.1.31. No hitches aside from the Market giving me a Server Error just after installing, which cleared up the next day. Since now I have my email (and in the future other sensitive apps/info) on the Nook I would like to be able to lock the screen like a full Android phone or tablet. Is this possible? I don't necessarily mean having the exact same way of locking (i.e., press the power button and the screen locks) but at least an app for doing that would be great. Any ideas?
Thanks!
Set a PIN lock on your Nook.
In an ADB shell:
Code:
am start -n com.android.settings/.ChooseLockPin
Thanks! Now if I could only get adb to work... doing adb shell gives me "error: device not found", and turning on AdbWireless and trying to connect with adb connect just hangs.
Renate NST said:
Set a PIN lock on your Nook.
In an ADB shell:
Code:
am start -n com.android.settings/.ChooseLockPin
Click to expand...
Click to collapse
Ah... SUFBS to the rescue! Did it from the terminal. Works perfectly! Thanks!
mcamou said:
Thanks! Now if I could only get adb to work... doing adb shell gives me "error: device not found", and turning on AdbWireless and trying to connect with adb connect just hangs.
Click to expand...
Click to collapse
Renate NST said:
Set a PIN lock on your Nook.
In an ADB shell:
Code:
am start -n com.android.settings/.ChooseLockPin
Click to expand...
Click to collapse
How to remove the lock?
I don't know if there is an easy user way to do this, but:
Code:
sqlite3 settings.db
delete from system where name like 'lock%';
.q
Either do this on the Nook in /data/data/com.android.providers.settings/databases/
Or else adb pull it, sqlite3 it, adb push it.
Renate NST said:
Set a PIN lock on your Nook.
In an ADB shell:
Code:
am start -n com.android.settings/.ChooseLockPin
Click to expand...
Click to collapse
Hi, I'm very new to rooting and have managed to get tinynoot to root my UK Simple Touch Glowlight. I can use the adb install in my command prompt but when I copied your script into the command prompt I just got a list of commands. I have looked at the adb command instructions here http://developer.android.com/tools/help/adb.html#commandsummary but still can't work out what to do. Would you mind giving me some slightly more detailed instructions for adding the lockscreen from a windows command prompt?
Thanks
EDIT 1: Just brought myself up to speed on shell stuff. Thank you, thank you, thank you Renate NST!!!!
Hi, I know this thread is a bit old but I am having a problem and I am bit of a blind baboon in a maze with all this.
I followed the directions as best I could: connected rooted Nook, started adb shell then:
Code:
# am start -n com.android.settings/.ChooseLockPin 1111
am start -n com.android.settings/.ChooseLockPin 1111
Starting: Intent { act=android.intent.action.VIEW dat=1111 }
Error: Activity not started, unable to resolve Intent { act=android.intent.actio
n.VIEW dat=1111 flg=0x10000000 }
Tried other things too but I can't code for toffees so..
Can you help?
icouldntfindit said:
Hi, I know this thread is a bit old but I am having a problem and I am bit of a blind baboon in a maze with all this.
I followed the directions as best I could: connected rooted Nook, started adb shell then:
Code:
# am start -n com.android.settings/.ChooseLockPin 1111
am start -n com.android.settings/.ChooseLockPin 1111
Starting: Intent { act=android.intent.action.VIEW dat=1111 }
Error: Activity not started, unable to resolve Intent { act=android.intent.actio
n.VIEW dat=1111 flg=0x10000000 }
Tried other things too but I can't code for toffees so..
Can you help?
Click to expand...
Click to collapse
Presumably that's your desired PIN (i.e. 1111?)
You don't put it on the command line, am start -n com.android.settings/.ChooseLockPin starts the PIN chooser activity on your Nook and you enter it there, twice, to set it.
cowbutt said:
Presumably that's your desired PIN (i.e. 1111?)
You don't put it on the command line, am start -n com.android.settings/.ChooseLockPin starts the PIN chooser activity on your Nook and you enter it there, twice, to set it.
Click to expand...
Click to collapse
Lmao there's something I didn't try. Thank you for replying so fast!
cowbutt said:
Presumably that's your desired PIN (i.e. 1111?)
You don't put it on the command line, am start -n com.android.settings/.ChooseLockPin starts the PIN chooser activity on your Nook and you enter it there, twice, to set it.
Click to expand...
Click to collapse
I have to say thank you, first, for providing this information! It was exactly what I wanted.
Now, though, I've been locked out of my device. I think pressure from inside my bookbag created a bunch of readings that the nook took as attempts to access the system, and I'm locked out after 'too many pattern attempts.' It says: "to unlock, sign in with your Google account." But I do that, with no response. (This is without active wi-fi, which I can't activate anyway!)
I was hoping I could use ADB to reset the PIN again, but ADB doesn't appear to recognize the system; maybe it's not opening up the device to USB until it gets unlocked.
I'm currently on the road so I can't go back to my home wi-fi...
Any suggestions?
jasonmehmel said:
Any suggestions?
Click to expand...
Click to collapse
Well, on my Nook, I'd open up the Nook, hook into the console connector and do the SQLite solution to delete the lock and reboot.
You probably never got around to soldering a console connector to your Nook.
If you had access to ADB you could do the same.
Apparently you have ADB over WiFi and the WiFi is off.
I could also boot up on Clockwork Mod Recovery and use ADB over USB.
(I already have CWM as my recovery internally.)
You could put CWM on an SD card and boot that.
Renate NST said:
...
I could also boot up on Clockwork Mod Recovery and use ADB over USB.
(I already have CWM as my recovery internally.)
You could put CWM on an SD card and boot that.
Click to expand...
Click to collapse
I basically did that. Not CWM specifically, but factory resetting it and then re-rooting it. I'm getting a lot of practice at rooting the little son of a gun...
jasonmehmel said:
... factory resetting ...
Click to expand...
Click to collapse
I didn't say anything about factory resetting.
The only way to fix things is to know what's going on.
Why don't you get a console somehow going to your device and fix the settings database?
Hello,
I have just rooted my nook ST glowlight using Nook manager, and it is my first android device so I am not very familiar with this world. I have installed android SDK on my laptop and started an adb console. I can see my device connected when I list the devices but when I run
am start -n com.android.settings/.ChooseLockPin
it says that 'am' is not recongnized as a command.
Could you please help here?
Many thanks
MRXIII said:
it says that 'am' is not recognized as a command
Click to expand...
Click to collapse
Interesting. Try
Code:
ls -l /system/bin/am
ls -l /system/bin/pm
Did you accidentally delete something?
This is the NG1 (old black Nook Glow)?
Renate NST said:
Interesting. Try
Code:
ls -l /system/bin/am
ls -l /system/bin/pm
Did you accidentally delete something?
This is the NG1 (old black Nook Glow)?
Click to expand...
Click to collapse
Hi Renate
Thank you for your reply. I am using windows, is ls supposed to work with adb ? I have tried but it says the same :/
'ls' is not recognized...
I did not delete anything as far as I know. It is the nook Simple touch glowlight (black)
thanks
Ha, ha, the joke's on me.
That "am" command is supposed to be executed in a Linux shell running over ADB.
Code:
C:\>adb shell
# am start -n com.android.settings/.ChooseLockPin
# ^C
C:\>
Renate NST said:
Ha, ha, the joke's on me.
That "am" command is supposed to be executed in a Linux shell running over ADB.
Code:
C:\>adb shell
# am start -n com.android.settings/.ChooseLockPin
# ^C
C:\>
Click to expand...
Click to collapse
Hi Renate
Happy new year.!
Is there a way to achieve lock screen using a windows shell ?
Thank you
MRXIII said:
Is there a way to achieve lock screen using a windows shell?
Click to expand...
Click to collapse
Do you mean:
Code:
C:\>adb shell am start -n com.android.settings/.ChooseLockPin

Workaround to remap home key

Hello! So I gave up a lot of time ago on having a custom launcher that was opened automatically instead of the stock launcher, but a while ago I thought about a way of using adb logcat to catch the events that launch the stock launcher and replace it with Wolf Launcher (or any other app, actually).
Disclaimer: this method requires a home server where you can run a docker instance or a bash script. It does not work directly inside FireTV.
I have not noticed any performance degradation in the firetv itself, and the latency is almost unnoticeable, to the point I can't even see a frame of the stock launcher (check video below).
I have put together a little script that will run a docker ubuntu instance, in which I then run this command:
./adb logcat '*:I' | grep --line-buffered "ActivityManager: START u0 {act=android.intent.action.MAIN cat=\[android.intent.category.HOME\] flg=0x10[0-9]00000 cmp=com.amazon.tv.launcher/.ui.HomeActivity_vNext" | xargs -I {} ./adb shell am start -n com.wolf.firelauncher/.screens.launcher.LauncherActivity
It will look for lines in the logcat that start the activity "com.amazon.tv.launcher/.ui.HomeActivity_vNext", which happens whenever you tap the home button or choose a firetv profile.
Then it sends a command to open the Wolf Launcher (am start -n com.wolf.firelauncher/.screens.launcher.LauncherActivity).
It can be modified to either listen to other action, or to launch any other app instead of the Wolf Launcher. Hope it's useful
The wallpaper goes to Amazon, for blocking every nice thing we find with updates
Hello @daavm , can you explain how to run that script? I mean, do i need to boot from Ubuntu and open a command window or can I run it on Windows 10?
I have a Fire Tv 4k Stick with wolf launcher, but there is no way i can delete the stock launcher and my son is always pressing the home button to find some videogames i dont want him to. The problem is that Amazon doesnt allow me to hide the recommendations so my only hope is to set the home button to launch the wolf launcher so the kid wont be able to find the %%%%% videogames.
Thank you
but there is no way i can delete the stock launcher a
Click to expand...
Click to collapse
I opened the remote and affixed cello tape on the place where home button is pressed.
Viola -- I also used KODI as default launch after boot using this https[://]f-droid[.]org/packages/news.androidtv.launchonboot/
Queaven said:
Hello @daavm , can you explain how to run that script? I mean, do i need to boot from Ubuntu and open a command window or can I run it on Windows 10?
I have a Fire Tv 4k Stick with wolf launcher, but there is no way i can delete the stock launcher and my son is always pressing the home button to find some videogames i dont want him to. The problem is that Amazon doesnt allow me to hide the recommendations so my only hope is to set the home button to launch the wolf launcher so the kid wont be able to find the %%%%% videogames.
Thank you
Click to expand...
Click to collapse
I guess you could adapt it for Windows, but this makes use of grep, which is a linux module, so you would need to rewrite the script... You can try Ubuntu WSL (https://ubuntu.com/wsl) and run it there I guess
alpenmmilch said:
I opened the remote and affixed cello tape on the place where home button is pressed.
Viola -- I also used KODI as default launch after boot using this https[://]f-droid[.]org/packages/news.androidtv.launchonboot/
Click to expand...
Click to collapse
Hey any idea if firestick supports external control protocols? I stumbled on a Siri shortcut that allows me to control my tcl tv with siri and I’m wondering if I can do the same with the firestick, there has to be a way tho because how else would the firestick app work?
Thanks for sharing!
From your video it looks very good.
I did something with Tasker, when I click on home it shows the Amazon launcher and jumps into Wolf Launcher, but you can clearly see the delay. Takes 1-2 seconds till Wolf Launcher is on.
Why do I need a Linux server with a Docker container?
The command is an ADB command?
Can I just run Remote ADB Shell on my smartphone and connect to my FireTV and copy & paste your code?
Falcon_X said:
Thanks for sharing!
From your video it looks very good.
I did something with Tasker, when I click on home it shows the Amazon launcher and jumps into Wolf Launcher, but you can clearly see the delay. Takes 1-2 seconds till Wolf Launcher is on.
Why do I need a Linux server with a Docker container?
The command is an ADB command?
Can I just run Remote ADB Shell on my smartphone and connect to my FireTV and copy & paste your code?
Click to expand...
Click to collapse
The docker container is just what I decided to use because I use Unraid on my home server. You can just do it on a linux machine without docker. It's just adb, yes.
Not sure how Tasker does it so can't help you with the delay. Haven't used Remote ADB Shell either, so I don't know. Sounds like it would work, but not sure how you would keep it in the background.
daavm said:
The docker container is just what I decided to use because I use Unraid on my home server. You can just do it on a linux machine without docker. It's just adb, yes.
Not sure how Tasker does it so can't help you with the delay. Haven't used Remote ADB Shell either, so I don't know. Sounds like it would work, but not sure how you would keep it in the background.
Click to expand...
Click to collapse
doesn't work. Sadly.
With your command, I got the error, that ./adb doesn't exist. Is adb a file or a folder?
I've tried to create this folder, but as I don't have root access I can't create a folder inside root.
I changed the paths in your command to /storage/emulated/0/adb but I get the error:
/storage/emulated/0/adb: can't execute: Is a directory
/storage/emulated/0/adb: Permission denied
Tried the same with creating a file called adb inside the adb folder - but the same Permission denied
Falcon_X said:
doesn't work. Sadly.
With your command, I got the error, that ./adb doesn't exist. Is adb a file or a folder?
I've tried to create this folder, but as I don't have root access I can't create a folder inside root.
I changed the paths in your command to /storage/emulated/0/adb but I get the error:
/storage/emulated/0/adb: can't execute: Is a directory
/storage/emulated/0/adb: Permission denied
Tried the same with creating a file called adb inside the adb folder - but the same Permission denied
Click to expand...
Click to collapse
? you are trying to run this in the fire tv directly, you have to run it from a linux machine. Download the platform-tools.zip for Android, unzip it, and you will have the adb file there. Again, run this in a linux machine, not inside the fire tv.
I have created a Docker container using the following command on my Synology nas:
sudo docker run -i -t --network=host ubuntu:latest /bin/bash -c "apt-get update && apt-get install -y android-tools-adb && /bin/bash"
With adb connect x.x.x.x:5555 I create a connection to the device and with adb shell I open a command line.
I have removed the ./ before the adb in the script.
But I don't know if it will work like this, I will get my Fire Cube tomorrow.
@daavm
I believe you have connected the device to the docker container via usb and are not running the script remotely.
I would have to find a way to build a Docker container that would automate this and run it remotely if it worked that way.
poyo1975 said:
I have created a Docker container using the following command on my Synology nas:
sudo docker run -i -t --network=host ubuntu:latest /bin/bash -c "apt-get update && apt-get install -y android-tools-adb && /bin/bash"
With adb connect x.x.x.x:5555 I create a connection to the device and with adb shell I open a command line.
I have removed the ./ before the adb in the script.
But I don't know if it will work like this, I will get my Fire Cube tomorrow.
@daavm
I believe you have connected the device to the docker container via usb and are not running the script remotely.
I would have to find a way to build a Docker container that would automate this and run it remotely if it worked that way.
Click to expand...
Click to collapse
No, I haven't connected the device via usb. I do the 'adb connect x.x.x.x:5555' as well. But that doesn't change anything.
You don't have to open the shell. Just run the script in the container.
I've created a Docker aswell, the same way poyo1975 did. Container is running.
I can connect via ADB to my FireTV in the shell from my server, but you said the script needs to run in the container and we don't have to open the shell.
I use Portainer for my Docker containers, I copied and pasted your command in the "command field" and clicked on "deploy container".
I get the error:
failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "./adb": stat ./adb: no such file or directory: unknown
Still to dumb to understand the whole thing, for me it's more like a trial and error. Hope to get another hint from you daavm
Hi Falcon_X,
I also use portainer, you can build yourself an image.
I have attached my dockerfile and 2 script files.
Just click in Portainer under image build new image and then in the web editor paste the content of the dockerfile.Under upload paste the two script files and click on build.You have to give the image a name for example ubuntu-adb.The adb-connect script file you have to edit with an editor and change the ip address of your firetv.After the image is built you can under the tab container create a new container with the name you gave when creating the image.
At every container restart a connection to the firetv is established and the script of daavm is started.
Should work, but I can only test it tomorrow.
Many thanks to daavm for his script
Falcon_X said:
I've created a Docker aswell, the same way poyo1975 did. Container is running.
I can connect via ADB to my FireTV in the shell from my server, but you said the script needs to run in the container and we don't have to open the shell.
I use Portainer for my Docker containers, I copied and pasted your command in the "command field" and clicked on "deploy container".
I get the error:
failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "./adb": stat ./adb: no such file or directory: unknown
Still to dumb to understand the whole thing, for me it's more like a trial and error. Hope to get another hint from you daavm
Click to expand...
Click to collapse
Again, ./adb will only work if you have downloaded platform-tools zip and unzipped it (which has adb inside). Alternatively, you can do apt install adb, and replace "./adb" by just "adb"
As an update, I now use the following script as a custom script in a linuxserver/webtop container (check linuxserver docs on how to use custom scripts):
Bash:
#!/bin/bash
echo "**** Installing ADB ****"
apt update && apt install -y adb
adb connect 192.168.0.97:5555
while true; do adb logcat | grep -G --line-buffered "ActivityManager: START u0 {act=\(com\.amazon\.tv\.action\.LAUNCH_PROFILE_PICKER\|android\.intent\.action\.MAIN cat=\[android\.intent\.category\.HOME\]\) flg=0x10\(0\|1\|2\)00000 cmp=com\.amazon\.\(tv\.launcher/\.ui\.HomeActivity_vNext\|ftv\.profilepicker/\.ui\.PickerActivity\)" | xargs -I {} adb shell am start -n com.wolf.firelauncher/.screens.launcher.LauncherActivity; done
I included the profile picker listener because I didn't want to have to select the profile every single time.
Awesome. Works flawlessly. Thank you!
Running on a old debian based raspberry pi zero.
Thanks again to daavm and poyo1875. Works!
Update: Only works until you shutdown the FireTV :-(
thanks
daavm said:
As an update, I now use the following script as a custom script in a linuxserver/webtop container (check linuxserver docs on how to use custom scripts):
Bash:
#!/bin/bash
echo "**** Installing ADB ****"
apt update && apt install -y adb
adb connect 192.168.0.97:5555
while true; do adb logcat | grep -G --line-buffered "ActivityManager: START u0 {act=\(com\.amazon\.tv\.action\.LAUNCH_PROFILE_PICKER\|android\.intent\.action\.MAIN cat=\[android\.intent\.category\.HOME\]\) flg=0x10\(0\|1\|2\)00000 cmp=com\.amazon\.\(tv\.launcher/\.ui\.HomeActivity_vNext\|ftv\.profilepicker/\.ui\.PickerActivity\)" | xargs -I {} adb shell am start -n com.wolf.firelauncher/.screens.launcher.LauncherActivity; done
I included the profile picker listener because I didn't want to have to select the profile every single time.
Click to expand...
Click to collapse
thanks! it's looks worked!
i have 2 questions
1. The adb log looks like this, is it normal?
2. Oops, when i press home, I can still see the Amazon home page, it will start after about 1 second.
Code:
Starting: Intent { cmp=com.wolf.firelauncher/.screens.launcher.LauncherActivity }
Warning: Activity not started, its current task has been brought to the front
Starting: Intent { cmp=com.wolf.firelauncher/.screens.launcher.LauncherActivity }
Warning: Activity not started, its current task has been brought to the front
Starting: Intent { cmp=com.wolf.firelauncher/.screens.launcher.LauncherActivity }
Warning: Activity not started, its current task has been brought to the front
...
SevenFXD said:
thanks
thanks! it's looks worked!
i have 2 questions
1. The adb log looks like this, is it normal?
2. Oops, when i press home, I can still see the Amazon home page, it will start after about 1 second.
Code:
Starting: Intent { cmp=com.wolf.firelauncher/.screens.launcher.LauncherActivity }
Warning: Activity not started, its current task has been brought to the front
Starting: Intent { cmp=com.wolf.firelauncher/.screens.launcher.LauncherActivity }
Warning: Activity not started, its current task has been brought to the front
Starting: Intent { cmp=com.wolf.firelauncher/.screens.launcher.LauncherActivity }
Warning: Activity not started, its current task has been brought to the front
...
Click to expand...
Click to collapse
The Adb log looks the same for me, too.
When I press home, I don't see the Amazon Launcher.
But when I shutdown the FireTV and my container is still running, it just shows: -- waiting for device --
When I turn the FireTV back on, it's still not recognized (IP is still the same).
Looks like I have to connect via ABD and re-run the script every time again, when I turn on the FireTV after a shutdown.
Can someone confirm this or is it just me?

Categories

Resources