Locking the screen - Nook Touch General

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

Related

Where to find an Ubuntu guide to root and remove stock apps on the Hero?

If anyone can post a link to a detailed Ubuntu guide for newbies to root the Hero and remove stock apps, I would appreciate it. The guide posted doesn't go into too much detail in Ubuntu since the OP said that he could not get it to work in Ubuntu. Thanks.
killabee44 said:
If anyone can post a link to a detailed Ubuntu guide for newbies to root the Hero and remove stock apps, I would appreciate it. The guide posted doesn't go into too much detail in Ubuntu since the OP said that he could not get it to work in Ubuntu. Thanks.
Click to expand...
Click to collapse
Wouldnt the Mac version work since they are both *nix?
I was able to root my Sprint HTC hero just fine running Jaunty. I followed the instructions in the guide you mentioned, for Ubuntu. One thing I noticed is before adb recognized my phone, I had to start "HTC Sync" from the phone's notifications. Just ignore the error about it not finding HTC Sync on your PC. Obviously it never will since HTC Sync is a Windows app
Here's the step by step that worked for me: http://romeosidvicious.com/2009/11/09/rooting-the-htc-hero-with-ubuntu-karmic/
I typed it so I could find it easily if necessary and figured why not share it....
romeosidvicious,
Thanks for all your hard work. I and others really appreciate it.
Stevious said:
I was able to root my Sprint HTC hero just fine running Jaunty. I followed the instructions in the guide you mentioned, for Ubuntu. One thing I noticed is before adb recognized my phone, I had to start "HTC Sync" from the phone's notifications. Just ignore the error about it not finding HTC Sync on your PC. Obviously it never will since HTC Sync is a Windows app
Click to expand...
Click to collapse
Yep, that is something I had to do in windows XP as well. It will help many others as well. Thanks.
Stevious said:
I was able to root my Sprint HTC hero just fine running Jaunty. I followed the instructions in the guide you mentioned, for Ubuntu. One thing I noticed is before adb recognized my phone, I had to start "HTC Sync" from the phone's notifications. Just ignore the error about it not finding HTC Sync on your PC. Obviously it never will since HTC Sync is a Windows app
Click to expand...
Click to collapse
Great, now my Ubuntu Jaunty machine won't detect the phone. I did the above but it still won't work. Im gonna reboot and retry...
Edit:
Nope, no love for my Ubuntu. It's not seeing the Hero. I will have to research this one.. If anyone has suggestions, please chime in.
Ok, found a solution:
http://forum.xda-developers.com/showthread.php?t=537508
----------------------------------------------------------------
Here is the part that solved it for me:
Setting up UDEV to recognize HTC Device -
1. Type the following into a terminal (Applications > Accessories > Terminal):
Code:
gksudo gedit /etc/udev/rules.d/51-android.rules
2. Now add the following line to the blank file:
Code:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
3. Click save and close.
4. To restart udev, open up a terminal and enter:
Code:
sudo /etc/init.d/udev restart
---------------------------------------------------------------------
Thanks to Wddglr for all the useful info. It looks like I will be using other things he posted about. Hopefully that info will help someone else.
Just curious, which version of Ubuntu are you running? I didn't have to make any UDEV changes in Jaunty.
romeosidvicious said:
Here's the step by step that worked for me: http://romeosidvicious.com/2009/11/09/rooting-the-htc-hero-with-ubuntu-karmic/
I typed it so I could find it easily if necessary and figured why not share it....
Click to expand...
Click to collapse
I want to follow through with this...
I was following this
http://www.youtube.com/watch?v=ArMO5IHS2eI
until the step came to plug it in and then he suggested typing "adb devices" which told me this.
"~/android-sdk-linux/tools$ adb devices
bash: adb: command not found"
So I came here and I want to follow the links tutorial.. two questions
Is it safe to proceed even though i've been told adb: Command not found
will i be able to proceed although ive been told this command is not found?
Onompoly2 said:
"~/android-sdk-linux/tools$ adb devices
bash: adb: command not found"
So I came here and I want to follow the links tutorial.. two questions
Is it safe to proceed even though i've been told adb: Command not found
will i be able to proceed although ive been told this command is not found?
Click to expand...
Click to collapse
Try:
sudo ./adb devices
From the same directory. Or, you can specify the full path:
sudo ~/android-sdk-linux/tools/adb devices
To answer your other questions, it won't work if it says the command is not found.
Okay
It worked but I must have turned into an idiot when i decided my operating system was good enough.
This isn't working, and I am not even upgraded to the operating system the tutorial is written for...
194 updates due... running 8.04 with a bunch of double half installed broken applications.. maybe I should reformat.
I'll let you guys know how things go which ever way it goes.
back again. fresh 9.10 install fully updated.
Following this
http://romeosidvicious.com/2009/11/09/rooting-the-htc-hero-with-ubuntu-karmic/
I get this far
[email protected]:~# sudo su
[email protected]:~# cd ~/android-sdk-linux/tools
[email protected]:~/android-sdk-linux/tools#
[email protected]:~/android-sdk-linux/tools#
[email protected]:~/android-sdk-linux/tools# ./adb push ../asroot2 /data/local/
711 KB/s (74512 bytes in 0.102s)
[email protected]:~/android-sdk-linux/tools# ./adb shell chmod 0755 /data/local/asroot2
[email protected]:~/android-sdk-linux/tools# /data/local/asroot2 /system/bin/sh
bash: /data/local/asroot2: No such file or directory
[email protected]:~/android-sdk-linux/tools# ./adb shell /data/local/asroot2 /system/bin/sh
[+] Using newer pipe_inode_info layout
Opening: /proc/559/fd/3
SUCCESS: Enjoy the shell.
# mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
cd /system/bin
cat sh > su
chmod 4755 su
reboot
Click to expand...
Click to collapse
It seems as though after it says "SUCCESS" that my terminal just stops responding to code...
Tried reading the link to where he made the tutorial from, but its a mixture of ubuntu and windows with 30 pages of posts.
Any thoughts/help?
Thanks
[Continuing]
So just pretending that everything is going as planned I reboot the phone and it actually turns my computer off as well..
So I continue with the steps.
[email protected]:~# cd ~/android-sdk-linux/tools
[email protected]:~/android-sdk-linux/tools# ./adb push ../recovery-RA-heroc-v1.2.3.img /sdcard/
* daemon not running. starting it now *
* daemon started successfully *
1199 KB/s (3352576 bytes in 2.730s)
[email protected]:~/android-sdk-linux/tools# ./adb shell
$ su
su: permission denied
Click to expand...
Click to collapse
But Get permission denied.
I'm going to go ahead and start over but skip the first line that i input that said SUCCESS and stopped the terminal.
(really don't know what i'm doing but I think I need to get these two lines in
cat sh > su
chmod 4755 su)
EDIT: on second thought perhaps this has something to do with me being logged in as root on my computer from the get go, i'll try that.
A dummy and his cell phone perhaps soon part.
# mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
cd /system/bin
cat sh > su
chmod 4755 su
reboot
Click to expand...
Click to collapse
It looks like you copy/pasted this whole section as a block. I think you need to execute the commands one at a time, and wait for a new "#" prompt between each one. The reason the terminal stops responding is that as one long string, it's not a meaningful command.
buck2202 said:
It looks like you copy/pasted this whole section as a block. I think you need to execute the commands one at a time, and wait for a new "#" prompt between each one. The reason the terminal stops responding is that as one long string, it's not a meaningful command.
Click to expand...
Click to collapse
I didn't, although i did try that as well
after I would do the mount commands i would no longer get a $ or a # sign, it was just a bunch of nothingness...
I ended up booting up my girlfriends vista and then spent quite a while figuring out how to get the driver for adb, I had to follow two different windows guides for rooting for some reason as well... so if that says anything.. just imagine how long it took me to realize how to get the driver hahah
buck2202 said:
It looks like you copy/pasted this whole section as a block. I think you need to execute the commands one at a time, and wait for a new "#" prompt between each one. The reason the terminal stops responding is that as one long string, it's not a meaningful command.
Click to expand...
Click to collapse
no, I'm having the same problem. After the "mount" command it gives me nothing.
Edit: doing this in karmic
Odd. I've had no problems following the generic procedure from theunlockr on ubuntu. My only suggestion would be to turn
Code:
./adb shell /data/local/asroot2 /system/bin/sh
into
Code:
./adb shell
/data/local/asroot2 /system/bin/sh
I'm not sure why it should make a difference, but on my computer "./adb shell <command>" exits the shell when it finishes. From what you've pasted, it doesn't look like that's happening to you, but that's my only guess right now.
If you run "./adb devices" do you see your serial number?
And out of curiosity, why are you running as root on your computer? (sudo su) Have you tried just starting the adb server as root, and running the rest of the commands normally? Does this work?
Code:
./adb kill-server
sudo ./adb start-server
./adb devices

[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.

[Q] Need help pushing a system file with adb

I have bricked my device when I tried to copy framework-res.apk to the system folder. I renamed the old framework-res.apk to framework-res.apk.bak but before I could paste the new one the phone freaked out and rebooted and now I'm stuck at the ATT white screen. I have adb access though so I'm hoping I can just push the framework-res file using adb. Every time I try this though I get an error saying file system is read only. I know all I probably need to do is get the computer to mount system as read/write. I just don't know how to do this. Is there anyone out there who can help me out?
Modified from:
http://forum.xda-developers.com/showthread.php?p=41339365
You may need to do:
mount -o remount,rw /system
chmod 777 /system/framework
Thank you for your quick reply. I'm kind of a novice when it comes to adb so bear with me, but when I use those commands I get 'mount' is not recognized as an internal or external command. I'm not sure if it matters or not but I'm running windows XP and my working directory is in c:\android-sdk\platform-tools when I tried executing "mount -o remount,rw /system".
Okay I tried changing the command to "adb shell mount -o remount,rw /system" now I get the error mount operation not permitted. I hope this doesn't mean I borked it. . . Also want to note that I did root the phone.
jack_slapped said:
Thank you for your quick reply. I'm kind of a novice when it comes to adb so bear with me, but when I use those commands I get 'mount' is not recognized as an internal or external command. I'm not sure if it matters or not but I'm running windows XP and my working directory is in c:\android-sdk\platform-tools when I tried executing "mount -o remount,rw /system".
Click to expand...
Click to collapse
You need to do some reading before you go any further - please. ADB is a command shell, and the commands he gave you are for running IN ADB after it's successfully connected to the phone.
There are lots of good writeups on using ADB all over the place.
jack_slapped said:
Okay I tried changing the command to "adb shell mount -o remount,rw /system" now I get the error mount operation not permitted. I hope this doesn't mean I borked it. . . Also want to note that I did root the phone.
Click to expand...
Click to collapse
You need to get INTO the shell first -- then execute the commands.
Also, always stop the system before modifying stuff, especially framework!
like so:
Code:
> [B]adb shell[/B]
$ [B]su[/B]
# [B]mount -o rw,remount /system[/B]
# [B]stop[/B]
# **[I]cp or mv whatever here[/I]**
# [B]reboot[/B]
your cmd prompt will return after reboot
alacrify said:
You need to do some reading before you go any further - please. ADB is a command shell, and the commands he gave you are for running IN ADB after it's successfully connected to the phone.
There are lots of good writeups on using ADB all over the place.
Click to expand...
Click to collapse
I know believe me when I say I'm trying to read as much as I possibly can. Nobody wants this phone fixed more than me. It's just alot of new stuff and I'm not entirely familiar with it. I think I'm connected with adb and started a shell using "adb -s myserial shell". I input the first command and got "mount: operation not permitted". Not really sure why it would say that considering I rooted the device.
jack_slapped said:
I know believe me when I say I'm trying to read as much as I possibly can. Nobody wants this phone fixed more than me. It's just alot of new stuff and I'm not entirely familiar with it. I think I'm connected with adb and started a shell using "adb -s myserial shell". I input the first command and got "mount: operation not permitted". Not really sure why it would say that considering I rooted the device.
Click to expand...
Click to collapse
Be sure to follow gwbard's directions a little closer. The first command inside the ADB shell is "su" which will elevate you to root - this will be necessary in order to execute the "mount" command.
From your command line (assuming in Windows), you'll run the "adb shell" command that gwbard showed. It should give you a prompt that ends with a dollar sign. Once you execute the "su" command, you'll see that change to a pound/hash sign (#).
gwbard said:
You need to get INTO the shell first -- then execute the commands.
Also, always stop the system before modifying stuff, especially framework!
like so:
Code:
> [B]adb shell[/B]
$ [B]su[/B]
# [B]mount -o rw,remount /system[/B]
# [B]stop[/B]
# **[I]cp or mv whatever here[/I]**
# [B]reboot[/B]
your cmd prompt will return after reboot
Click to expand...
Click to collapse
Dude you are the man! That did the trick. I really appreciate it. I'm still trying to figure out exactly what a shell is and how that ties into adb but I learned a good bit about it from today. I've used linux before and I have heard of a shell but never really understood what exactly it was. Anyways thanks again for everyone who helped me get this working.
Aou said:
Be sure to follow gwbard's directions a little closer. The first command inside the ADB shell is "su" which will elevate you to root - this will be necessary in order to execute the "mount" command.
From your command line (assuming in Windows), you'll run the "adb shell" command that gwbard showed. It should give you a prompt that ends with a dollar sign. Once you execute the "su" command, you'll see that change to a pound/hash sign (#).
Click to expand...
Click to collapse
Yea I posted that last one before I saw his instructions. They were right on point. Thanks guys!
jack_slapped said:
Dude you are the man! That did the trick. I really appreciate it. I'm still trying to figure out exactly what a shell is and how that ties into adb but I learned a good bit about it from today. I've used linux before and I have heard of a shell but never really understood what exactly it was. Anyways thanks again for everyone who helped me get this working.
Click to expand...
Click to collapse
When you click "start" and type "cmd", you're starting a shell. They're command interpreters that extend functionality in specific ways. like "dir" for the Windows/DOS command shell, and "su" or "mount" for adb. Lots of good writeups on that around too

Joying PX5 Octa-core: Options for rooting or just getting BT open? (NOT MTCB/MTCD)

I recently bought a Joying JY-HCS01P2 head unit. I am content with the general performance of the head unit for music, navi, etc. However, I cannot find any good options in terms of rooting the device. My primary interest is getting open access to the bluetooth settings. The unit only seems to allow pairing to a phone or certain obd2 adapters. I am trying to get it to function with a bluetooth adapter I use for datalogging and tuning on an aftermarket engine computer. The unit will find this BT adapter and say device connected, but no app will see it and the BT chain ICON shows as broken.
The info on the head unit is
PN JY-HCS01P2
CPU ARM Cortex-A53 eight core 2+32G PX5
MCU: JY_(R68)_26_C26_6026_CAN(All)
I have tried accessing the unit through both of the 2 USB connections with ADB, but have not had any success. The unit will not show up at all on the PC device manager. Doing an "ADB devices" search does not list any device. The USB connections are working as the phone will function over both.
Kingoroot will get to 90% then fail.
I have tried installing BT connection apps, but when accepting to allow the app to turn on BT, it just sits there attempting to turn it on, yet the head unit will not allow it.
I've been searching this forum for the last 2 days and tried a few of the suggestions but nothings works.
Look at this thread and then look at post 10.
No guarantees.
I've got that thread bookmarked. The problem is that I cannot even get the abd to connect. It seems I need to make at least the initial connection over USB, which also seems to be locked down per my experience. I did try a tcpip connection in hopes that the factory left that door open, but no luck.
Download a terminal app from google play like jackpal terminal.
Open it and on the prompt type:
Code:
setprop persist.adb.tcp.port 5555
exit and reboot.
Try if it works now.
This is what I get after the terminal input
D:\Downloads\platform-tools-latest-windows\platform-tools>adb connect tcpip 172.20.10.14
adb: usage: adb connect <host>[:<port>]
D:\Downloads\platform-tools-latest-windows\platform-tools>adb devices
List of devices attached
* daemon not running; starting now at tcp:5037
* daemon started successfully
D:\Downloads\platform-tools-latest-windows\platform-tools>adb ddevices
adb: usage: unknown command ddevices
D:\Downloads\platform-tools-latest-windows\platform-tools>adb devices
List of devices attached
D:\Downloads\platform-tools-latest-windows\platform-tools>adb connect 172.20.10.14
unable to connect to 172.20.10.14:5555: cannot connect to 172.20.10.14:5555: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. (10060)
D:\Downloads\platform-tools-latest-windows\platform-tools>
Used method for adb over wifi, root does not stick
I setup my working usb adb, and used your install.bat as a guide
Every command returned error free, root did not stick after reboot.
surfer63 said:
Download a terminal app from google play like jackpal terminal.
Open it and on the prompt type:
Code:
setprop persist.adb.tcp.port 5555
exit and reboot.
Try if it works now.
Click to expand...
Click to collapse
jon volk said:
This is what I get after the terminal input
D:\Downloads\platform-tools-latest-windows\platform-tools>adb connect tcpip 172.20.10.14
adb: usage: adb connect <host>[:<port>]
Click to expand...
Click to collapse
You need to execute my setprop command in the android terminal on your head unit. Did you do that?
And the scripts from your linux or windows pc.
I did execute the setprop command on the head unit. Should there have been a response after entering that command? I need to try it again when I have some more time to make sure everything is correct next time.
Tried it again a few times and no luck. I am finding it strange that i can’t even get it to show up on the drive manager on my pc over USB
jon volk said:
Tried it again a few times and no luck. I am finding it strange that i can’t even get it to show up on the drive manager on my pc over USB
Click to expand...
Click to collapse
I've got it to "work" but method does not result in root.
carter.w.jason said:
I've got it to "work" but method does not result in root.
Click to expand...
Click to collapse
Can you please open a terminal on the unit, or connect via adb (adb kill-server; adb connect w.x.y.z; adb shell)
and do on the prompt:
Code:
cat /system/bin/install-recovery.sh
ls -l /system/xbin/su*
ls -lr /system/app/Super*
Please post the results.
Edit: I forgot the 3rd command. Just added
surfer63 said:
Can you please open a terminal on the unit, or connect via adb (adb kill-server; adb connect w.x.y.z; adb shell)
and do on the prompt:
Code:
cat /system/bin/install-recovery.sh
ls -l /system/xbin/su*
ls -lr /system/app/Super*
Please post the results.
Edit: I forgot the 3rd command. Just added
Click to expand...
Click to collapse
"ls -lr" comes back as a unkown option. "ls -l" was used instead.
Code:
[email protected]:/ $ cat /system/bin/install-recovery.sh
#!/system/bin/sh
# This install-recovery.sh is installed here to start the
# seSuperuser su binary in daemon mode
/system/xbin/su --daemon &
[email protected]:/ $ ls -l /system/xbin/su*
-rwxr-xr-x root root 315940 2018-04-06 22:18 su
-rwxr-xr-x root root 0 2018-04-06 21:06 su.org
-rwxr-xr-x root root 0 2018-03-12 20:07 sugote
-rwxr-xr-x root root 289520 2018-03-12 20:07 sugote-mksh
lrwxrwxrwx root root 2018-03-17 17:44 sum -> /system/xbin/busybox
[email protected]:/ $ ls -l /system/app/Super*
-rw-r--r-- root root 1012569 2018-04-06 22:18 Superuser.apk
[email protected]:/ $
Thanks.
From the prompt ($) I can see that you are not root.
If you are in a terminal on the PX5 unit and you type "su" in the terminal :what do you get? Does the Superuser apk ask you to give root access?
do you get a "#" prompt?
surfer63 said:
Thanks.
From the prompt ($) I can see that you are not root.
If you are in a terminal on the PX5 unit and you type "su" in the terminal :what do you get? Does the Superuser apk ask you to give root access?
do you get a "#" prompt?
Click to expand...
Click to collapse
"Permission denied"
su would work when I had it rooted with kingoroot
carter.w.jason said:
"Permission denied"
Click to expand...
Click to collapse
See if you can install attached Superuser.apk and please try again.
surfer63 said:
See if you can install attached Superuser.apk and please try again.
Click to expand...
Click to collapse
Result is the exact same.
If I open Superuser, it is all blank except for "Superuser" and three menu icons at top. Older APK had the same behavior.
Root actions do not ask for any prompt
carter.w.jason said:
Result is the exact same.
If I open Superuser, it is all blank except for "Superuser" and three menu icons at top. Older APK had the same behavior.
Root actions do not ask for any prompt
Click to expand...
Click to collapse
I can't do anything further at the moment.
Do you want me to send you a script to undo it?
surfer63 said:
I can't do anything further at the moment.
Do you want me to send you a script to undo it?
Click to expand...
Click to collapse
No, that is ok. I can rerun kingoroot and get root if needed. Will probably just reflash and box it up.
I'll have my new Intel Sofia on Monday. Thanks for all the work!
I cant seems to connect. It say device not found. I have also setprop as well on my unit
GixxerRaider said:
I cant seems to connect. It say device not found. I have also setprop as well on my unit
Click to expand...
Click to collapse
Don't give incomplete statements like "I have also setprop as well". From that incomplete statement we can't see whether you used the right command and whether you did not make typos. Be complete.
It should be:
Code:
setprop persist.adb.tcp.port 5555
Did you reboot your unit afterwards? Did you also reboot your pc/laptop? Each time you do not get a connection you need to do a "adb kill-server" on your pc to make sure you initialize it again. It sometimes get "corrupted".

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