Wink-Relay touchscreen runs android 4.3 - General Topics

Unscrew the back cover.
Bottom right corner, under the green D1 LED there are 4 soldering pads,
Top to bottom, GND, RX, TX (Serial: 115200,N,8,1)
Use the RPI adafruit serial to USB cable and connect it as:
BlackGND-GND, GreenTX-RX, WhiteRX-TX , leave Red not connected.
Open a terminal in Linux and type:
$screen /dev/ttyUSB0 115200
Reset the board from the small button on the edge under the display.
Watch the Android boot messages.
You are root.
[email protected]_xxx:/ #
Tips:
wget,netstat,iperf,iwconfig,iwlist,su,wl
127|[email protected]_xxx:/system/xbin # getprop | grep edis
[build.edison.sig]: [20150520]
[edison-i7020h-corr]: [255=45,365=35,448=52,534=66,623=77,707=95,775=125]
[edison-i7020t-corr]: [-17]
[edison-runasroot]: [/data/edison/scripts/edison.sh]
[edison.backup]: [/device/edison.zip]
[edison.initialised]: [1]
[edison.otaenabled]: [0]
[edison.otafile]: [edison-ota]
[init.svc.edisonwink]: [running]
[init.svc.edisonwl]: [stopped]
[ro.build.description]: []
[ro.build.fingerprint]: []

Hacking from buttons
...factory mode by holding down top button upon reset get's to recovery menu.
flash to factory. ...
reboot the systemwait the wink app, cover light sensor and press the lower button for 1 minute or the relay clicks several times. Android OS desktop should appear. Connect the device over wifi to local network, find the device IP, then from a computer do adb connect device-ip:5554, the adb shell has root access.

wink relay version 2.3.1
marinapang said:
...factory mode by holding down top button upon reset get's to recovery menu.
flash to factory. ...
reboot the systemwait the wink app, cover light sensor and press the lower button for 1 minute or the relay clicks several times. Android OS desktop should appear. Connect the device over wifi to local network, find the device IP, then from a computer do adb connect device-ip:5554, the adb shell has root access.
Click to expand...
Click to collapse
Looks like version 2.3.1 has adb root access, just a bug
adb connect the-device-ip
adb shell
su
mount -o remount,rw /dev/block/mmcblk0p5 /system​
Of bring on front the android launcher
am start -n com.android.launcher/com.android.launcher2.Launcher​

This is a great find.
Is the Relay interface essentially an APK on top of the Android base?

mustardPersona said:
This is a great find.
Is the Relay interface essentially an APK on top of the Android base?
Click to expand...
Click to collapse
Yes
linux$ adb kill-server
linux$ adb connect 192.168.1.126
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
connected to 192.168.1.126:5555
linux$ adb shell
[email protected]_xxx:/ $ ps
USER PID PPID VSIZE RSS WCHAN PC NAME
.....
u0_a13 2881 2304 660344 21444 ffffffff 00000000 S com.android.inputmethod.latin
system 2898 2304 878728 44580 ffffffff 00000000 S com.quirky.android.wink.projectone
u0_a9 2903 2304 661576 20584 ffffffff 00000000 S android.process.media
wifi 2930 1 3192 1772 ffffffff 00000000 S /system/bin/wpa_supplicant
system 2940 2304 666764 18076 ffffffff 00000000 S com.android.settings
u0_a18 2956 2304 658464 16668 ffffffff 00000000 S com.android.music
system 2976 2304 659388 16176 ffffffff 00000000 S com.flex.edisonservice:edisonsrv
u0_a10 3000 2304 657908 15020 ffffffff 00000000 S com.flex.edison.edisonplayer
bluetooth 3031 2304 683660 21316 ffffffff 00000000 S com.android.bluetooth
u0_a5 3043 2304 657672 18116 ffffffff 00000000 S com.android.providers.calendar
u0_a8 3076 2304 660352 17680 ffffffff 00000000 S com.android.deskclock
system 3119 2304 656808 14868 ffffffff 00000000 S com.flex.edisonservice
u0_a11 3143 2304 661628 17848 ffffffff 00000000 S com.android.gallery3d
u0_a20 3158 2304 656756 15468 ffffffff 00000000 S com.android.onetimeinitializer
dhcp 3185 1 936 452 ffffffff 00000000 S /system/bin/dhcpcd
radio 3226 2304 656948 16872 ffffffff 00000000 S com.android.phone
u0_a14 3243 2304 660164 18068 ffffffff 00000000 S com.android.launcher
u0_a24 3261 2304 658488 16256 ffffffff 00000000 S com.android.quicksearchbox
u0_a19 3296 2304 656908 15016 ffffffff 00000000 S com.android.musicfx
shell 3405 2319 832 460 c004d9f0 4014ae1c S /system/bin/sh
root 3411 2 0 0 ffffffff 00000000 S kworker/0:0
shell 3412 3405 1152 460 00000000 40205060 R ps
[email protected]_xxx:/ $

wink relay issues, problems
I found several problems with the Wink application.
The UI sucks, the settings are one way.
After a power down the touch and switches are non responsive, then comes all in a blast. There is a lot of network activity. Junior level development ... all over.
If the network is slow the touch commands are delayed. Wink is relying the commands to Wink servers forward and back, instead doing it locally and updating the server asynchronous. Looks like the software was all developed in the far east, it sucks.

Thanks for the guide. I wonder what more practical things I can do with it like this. Great for visuals at the very least! Automate on :good:

thanks for the helps, it really works for me. thanks !

marinapang said:
I found several problems with the Wink application.
The UI sucks, the settings are one way.
After a power down the touch and switches are non responsive, then comes all in a blast. There is a lot of network activity. Junior level development ... all over.
If the network is slow the touch commands are delayed. Wink is relying the commands to Wink servers forward and back, instead doing it locally and updating the server asynchronous. Looks like the software was all developed in the far east, it sucks.
Click to expand...
Click to collapse
Actually, check if you have the latest Wink hub update - they added local radio support (I could be wording that wrong) and now certain actions can be done without going to the cloud. It is being deployed in waves, so it may not have hit all of them by now.
I wouldn't say it is more stable, but it definitely is quicker now.

Anyone have a system dump from the Relay?

johnny grep said:
Anyone have a system dump from the Relay?
Click to expand...
Click to collapse
I think this page used to have a rom dump. But the link looks broken. Let us know if you find a working one!
http://wink-internals.org/index.php?title=Relay#Rom_Dump

Progress?
Anyone make any further progress with this? Love the hardware but the software as already noted is terrible. Would be cool to install an intercom app to gain the functionality that wink promised but never provided.

The latest version of the Wink Relay firmware still has some form of root access via adb, but /system is read-only and I can't remount it. It used to work on the factory image.

dear Firehawk
i have a backup from my wink relay that i can share
made with adb pull

Relay backup
squeds said:
dear Firehawk
i have a backup from my wink relay that i can share
made with adb pull
Click to expand...
Click to collapse
I would like a copy of the relay backup if you still have it. Thanks.

If the factory ROM or a backup is available, I'd really like to get a copy too! It seems they lock things down with each subsequent update to the OS. Would like to have a way to revert should they cripple it too much.
Thanks!
Ben

I don't think there is a factory ROM, There is an Android FS factory image
in one of the partitions, which by default is not mounted.
Is a *.zip file, which from Recovery menu Option, Reset to factory
is flashed on top of the existent Image.
Can you get into recovery menu ?

So a factory reset flashes the Out of the Box image back on? That's interesting. Hmmn
I've never been able to get to the recovery screen.
Ben

Zottig said:
So a factory reset flashes the Out of the Box image back on? That's interesting. Hmmn
I've never been able to get to the recovery screen.
Ben
Click to expand...
Click to collapse
EDIT:
To get into recovery after the newest update:
Cover photoeye and press the top button
Press and release the reset button while holding the photoeye and top button.
You are in recovery mode
Now, I wish we could clean up the interface. Change brightness/colors at LEAST. We have these nicely sized color screens and they use all of 2-3 colors. Looks very bland.

What about resetting (bottom small button behind the bottom edge, accessible from bottom edge, pressit with your nail ... might need a guitar player nails) , while covering the motion sensor and:
1. try top button hold down then reset for .. until something happen (could play jessie girl / or go in recovery menu)
2. try bottom button hold down then reset, until something happen (could play jessie girl / or go in recovery menu)
2. try both buttons hold down then reset, until something happen (could play jessie girl / or go in recovery menu)
from recovery menu, reset to factory (one button navigates, one selects). If the factory image is the original one ( aka March .. May 2015) the switch to Android
procedure (while wink ap is running covering sensor and holding down button till relays click 3 times and you get android desktop / warning there is no back button, but an adb over wifi on 5554 or 5555 can help issuing keyevents ) works.
if they have been replaced the factory image during an update, there is a possibility that the feature is disabled.
I'll upload sometime this week the default factory image zip to some share location.

Related

wifi hot spot dosent like moto...

wtf... when you need wifi access it turns out that the mac address of the phone is filtered...
to be sure, changed my laptop wifi mac to match the phone one, and guess... no access....
ok the mac address on the phone wifi, can be changed temporary, but it is a pain (and when i say pain i mean repeating pain )
so i found that actually the mac is stored in /pds/wifi/nvs_map.bin
long story short...
moto mac 11:22:33:44:55:66
relevant part in hex of the nvs_map:
Code:
00000000 01 6D 54 [b]66[/b] [b]55[/b] [b]44[/b] [b]33[/b] 01 71 54 [b]22[/b] [b]11[/b]
and changed mac aa:bb:cc:dd:ee:ff
and the relevant part in the nvs_map
Code:
00000000 01 6D 54 [b]ff[/b] [b]ee[/b] [b]dd[/b] [b]cc[/b] 01 71 54 [b]bb[/b] [b]aa[/b]
after replacing the file (ofcourse, make a backup)
the change will be permanent (or at least until restore from the backup
so choose carefully the mac address please
i tested that with success on my xt720, i suppose that the trick will work on every phone which utilize /pds/wifi/nvs_map.bin file on wlan initialization...
e.g. if there is service like
Code:
service wlan_loader /system/bin/wlan_loader \
-f /system/etc/wifi/fw_wlan1271.bin -i /system/etc/wifi/tiwlan.ini \
-e [b]/pds/wifi/nvs_map.bin[/b]
class post-zygote_services
disabled
oneshot
p.s. intensionally the post is not very user friendly. the reason is that i am afraid that if somebody do not understand really well what to do, can screw the wifi. I cannot explain in great details, but the above is more than enough if someone know about hex editors, copying files etc..
problem with MAC Wifi - Motorola Defy
peshovec said:
wtf... when you need wifi access it turns out that the mac address of the phone is filtered...
to be sure, changed my laptop wifi mac to match the phone one, and guess... no access....
ok the mac address on the phone wifi, can be changed temporary, but it is a pain (and when i say pain i mean repeating pain )
so i found that actually the mac is stored in /pds/wifi/nvs_map.bin
long story short...
moto mac 11:22:33:44:55:66
relevant part in hex of the nvs_map:
Code:
00000000 01 6D 54 [b]66[/b] [b]55[/b] [b]44[/b] [b]33[/b] 01 71 54 [b]22[/b] [b]11[/b]
and changed mac aa:bb:cc:dd:ee:ff
and the relevant part in the nvs_map
Code:
00000000 01 6D 54 [b]ff[/b] [b]ee[/b] [b]dd[/b] [b]cc[/b] 01 71 54 [b]bb[/b] [b]aa[/b]
after replacing the file (ofcourse, make a backup)
the change will be permanent (or at least until restore from the backup
so choose carefully the mac address please
i tested that with success on my xt720, i suppose that the trick will work on every phone which utilize /pds/wifi/nvs_map.bin file on wlan initialization...
e.g. if there is service like
Code:
service wlan_loader /system/bin/wlan_loader \
-f /system/etc/wifi/fw_wlan1271.bin -i /system/etc/wifi/tiwlan.ini \
-e [b]/pds/wifi/nvs_map.bin[/b]
class post-zygote_services
disabled
oneshot
p.s. intensionally the post is not very user friendly. the reason is that i am afraid that if somebody do not understand really well what to do, can screw the wifi. I cannot explain in great details, but the above is more than enough if someone know about hex editors, copying files etc..
Click to expand...
Click to collapse
----------------------------
Hi guys...
I need help to configure the nvs_map.bin... Edit the file with Hex Editor program and now the WIFI does not work. I have no backup file nvs_map.bin.
I need to get back to the Mac I had before. I have not a backup file nvs_map.bin, but if I have a backup of the MAC shown in the phone settings menu. Now I get 00:00:00:00:00:00.
Sorry. My English is bad .. I am Spanish
Thanks for the info

[Q&A] [ROM]★[TF700 KitKat 4.4.4][ZOMBi-X OMNI KANG b9][Oct 10]★

Q&A for [ROM]★[TF700 KitKat 4.4.4][ZOMBi-X OMNI KANG b9][Oct 10]★
Some developers prefer that questions remain separate from their main development thread to help keep things organized. Placing your question within this thread will increase its chances of being answered by a member of the community or by the developer. Thanks for understanding and for helping to keep XDA neat and tidy! :smile:
Reboot hangs after update to latest Beta release of Zombi-K
Hi :
I just went through the steps of installing the latest Beta (beta 9) for the Zombi-K version on my TF700 (I was going from CM11 latest Milestone release, M11(??)). I am using Clockwork Recovery 6.0.4.7. The installation process goes smoothly, however when I have to reboot, I get an issue "Root permissions lost, would you like to fix it"... and I chose the option to fix it. and continue to reboot.
(at this point, I have just chosen defaults for all the options during the installation process. )
my TF700 goes no further than the boot up animation. its stuck there with no progress.
So I scroll through this group in hopes of finding some solutions and I came across the issue that occurred in Beta5 with Root permissions being lost, So I thought why not flash the SuperUser Zip that was recommended. I did not have any luck with it either as upon reboot from recovery mode still complained about loss of root access. Also my Clockwork Recovery's behavior seems to have changed. I have to doubletap to get the actions to execute (I have the touch version installed so a swipe right is yes and a swipe left is go back, when I swipe right I have to follow that up with a tap)
any help with this is much appreciated.
Cheers
PS: I just rebooted again to see if I could discern what the reasons might be and these are the messages:
/system : cannot find /system (or something to that extent)
/data : cannot find /data (something similar).
Looks like the install was not completely successful.
Reinstall your image. Something didn't work.
Sent from my K013 using Tapatalk
cub69 said:
Reinstall your image. Something didn't work.
Click to expand...
Click to collapse
I went through the reinstall process, no luck. Altho', I did notice that the messages about /system and /data were related to installation on an external_sd. and since I was doing everything on the internal disk, I think these warnings/messages can be ignored.
I do however, still get the messages about Root permissions upon completion of the install and rebooting from recovery
Is this anything related to Clockwork or it does not matter what recovery is used.
Thanks
agastya71 said:
I went through the reinstall process, no luck. Altho', I did notice that the messages about /system and /data were related to installation on an external_sd. and since I was doing everything on the internal disk, I think these warnings/messages can be ignored.
I do however, still get the messages about Root permissions upon completion of the install and rebooting from recovery
Is this anything related to Clockwork or it does not matter what recovery is used.
Thanks
Click to expand...
Click to collapse
The message about fixing root is a CWM bug and you can ignore it. Just say no.
Most people here use TWRP with this rom, so there is very limited experience with your recovery in this community.
Two questions: You did a clean install (wiping data, cache and Dalvik) prior to the rom flash?
Are you sure you did NOT use the "install as rom2sd" option in the Aroma installer?
I live in China and so using a vpn is very important to me. Anyway, I can only connect to a pptp vpn and not any other protocol using zombi beta 9. I can connect to the same vpn servers using l2tp on my nexus 4 (cyanogenmod 11) and my laptop. Can anyone else connect to a l2tp vpn?
I'm using the grimlock kernel and internal f2fs if that is relevant.
Thanks
Hi, I installed zombi a week ago on rom2sd. Today I thought I'll do wipe to internal (system, data, caches) and flash zombi there too. Everything went fine, good work you all. Only I can't boot to microsd install any more. I reinatalled rom2sd to force it switch to microsd, but no luck. The bootloader shows the mmcblk1 partitions under the four pinguines, but it won't boot there.
Any Idea how to get it back on SD?
Ps. Install differences are that data on internal is f2fs, and ext4 on external. Also I left the grimm (?) kernel choice active on internal, on external it was that's kernel.
ikkeT said:
Hi, I installed zombi a week ago on rom2sd. Today I thought I'll do wipe to internal (system, data, caches) and flash zombi there too. Everything went fine, good work you all. Only I can't boot to microsd install any more. I reinatalled rom2sd to force it switch to microsd, but no luck. The bootloader shows the mmcblk1 partitions under the four pinguines, but it won't boot there.
Any Idea how to get it back on SD?
Ps. Install differences are that data on internal is f2fs, and ext4 on external. Also I left the grimm (?) kernel choice active on internal, on external it was that's kernel.
Click to expand...
Click to collapse
All ROMs, internal, and external, share one kernel. And to boot the external ROM, the directory /system/boot needs to exist with the preinit scripts to detect the external card and switch to it. This directory is lost when you reinstall a ROM on internal storage, so you need to restore this directory. Probably the easiest way to do this is to reinstall your external ROM.
Thanks, I'll rerun the install with rom2sd selected this time. I thought the rom2sd.zip install would create those init scripts. Let's see what happens...
Hmm... I obviously didn't understand it right. Now it boots to ext sd, but if I shutdown and remove sd and boot, it will not boot to internal. Just keeps rotating zombie logo.
I thought it should boot to ext if it's present, and if not present, then to internal.
Sent from my GT-I9300 using Tapatalk
ikkeT said:
Hmm... I obviously didn't understand it right. Now it boots to ext sd, but if I shutdown and remove sd and boot, it will not boot to internal. Just keeps rotating zombie logo.
I thought it should boot to ext if it's present, and if not present, then to internal.
Click to expand...
Click to collapse
Yes, that's how it was supposed to work. Maybe now the filesystem detection script is missing in /system/boot that corrects the fstab for f2fs. While it hangs at the boot animation, you can adb pull /fstab.cardhu and look if the line for /data has been modified for f2fs. If not, post the output of "adb ls -l /system/boot/preinit.d" to see which scripts are now there.
ikkeT said:
Hmm... I obviously didn't understand it right. Now it boots to ext sd, but if I shutdown and remove sd and boot, it will not boot to internal. Just keeps rotating zombie logo.
I thought it should boot to ext if it's present, and if not present, then to internal.
Sent from my GT-I9300 using Tapatalk
Click to expand...
Click to collapse
This happened to me last week.
Iirc, fixing permissions in Recovery solved it
Sent from my TF700T using Tapatalk
Thanks _that for your help, here some details:
_that said:
While it hangs at the boot animation, you can adb pull /fstab.cardhu and look if the line for /data has been modified for f2fs..
Click to expand...
Click to collapse
It is there:
Code:
/dev/block/mmcblk0p1 /system ext4 noatime,noauto_da_alloc,ro wait
/dev/block/mmcblk0p2 /cache ext4 noatime,noauto_da_alloc,nosuid,nodev,nomblk_io_submit,errors=panic wait
/dev/block/mmcblk0p8 /data f2fs noatime,nosuid,nodev,errors=panic wait,encryptable=footer
_that said:
If not, post the output of "adb ls -l /system/boot/preinit.d" to see which scripts are now there.
Click to expand...
Click to collapse
Code:
$ adb shell ls -l /system/boot/preinit.d
-rwxr-xr-x root root 2334 2008-08-01 15:00 20detect-microsd
-rwxr-xr-x root root 857 2008-08-01 15:00 30fstab-f2fs
And this is where vm fails to start, repeats in logcat:
Code:
D/dalvikvm(31629): Added shared lib libnativehelper.so 0x0
D/dalvikvm(31629): No JNI_OnLoad found in libnativehelper.so 0x0, skipping init
E/dalvikvm(31629): JNI posting fatal error: Native registration unable to find class 'com/android/internal/os/RuntimeInit'; aborting...
I/dalvikvm(31629): "main" prio=5 tid=1 NATIVE
I/dalvikvm(31629): | group="main" sCount=0 dsCount=0 obj=0x41930ca8 self=0x400a33c0
I/dalvikvm(31629): | sysTid=31629 nice=0 sched=0/0 cgrp=default handle=1074827604
I/dalvikvm(31629): | state=R schedstat=( 248334000 31143000 92 ) utm=17 stm=7 core=0
I/dalvikvm(31629): #00 pc 0000132e /system/lib/libcorkscrew.so (unwind_backtrace_thread+29)
I/dalvikvm(31629): #01 pc 0006057a /system/lib/libdvm.so (dvmDumpNativeStack(DebugOutputTarget const*, int)+33)
I/dalvikvm(31629): #02 pc 00054570 /system/lib/libdvm.so (dvmDumpThreadEx(DebugOutputTarget const*, Thread*, bool)+395)
I/dalvikvm(31629): #03 pc 000545de /system/lib/libdvm.so (dvmDumpThread(Thread*, bool)+25)
I/dalvikvm(31629): #04 pc 00048fe0 /system/lib/libdvm.so
I/dalvikvm(31629): #05 pc 00001fa8 /system/lib/libnativehelper.so (jniRegisterNativeMethods+39)
I/dalvikvm(31629): #06 pc 0004ddce /system/lib/libandroid_runtime.so
I/dalvikvm(31629): #07 pc 0004e0bc /system/lib/libandroid_runtime.so (android::AndroidRuntime::startReg(_JNIEnv*)+23)
I/dalvikvm(31629): #08 pc 0004eb0c /system/lib/libandroid_runtime.so (android::AndroidRuntime::start(char const*, char const*)+183)
I/dalvikvm(31629): #09 pc 0000105a /system/bin/app_process
I/dalvikvm(31629): #10 pc 0000e410 /system/lib/libc.so (__libc_init+47)
Unfortunately I'm not an Android guy, so I don't know why "class 'com/android/internal/os/RuntimeInit';" would be missing. It seems it has succeeded to do mounts according to fstab. I could try fixing permissions, like drewski_1 suggested.
---------- Post added at 12:06 AM ---------- Previous post was at 12:00 AM ----------
ikkeT said:
I could try fixing permissions, like drewski_1 suggested.
Click to expand...
Click to collapse
No difference. Still fails like above at:
Code:
D/AndroidRuntime( 3845): >>>>>> AndroidRuntime START com.android.internal.os.ZygoteInit <<<<<<
ikkeT said:
Code:
D/dalvikvm(31629): Added shared lib libnativehelper.so 0x0
D/dalvikvm(31629): No JNI_OnLoad found in libnativehelper.so 0x0, skipping init
E/dalvikvm(31629): JNI posting fatal error: Native registration unable to find class 'com/android/internal/os/RuntimeInit'; aborting...
Unfortunately I'm not an Android guy, so I don't know why "class 'com/android/internal/os/RuntimeInit';" would be missing. It seems it has succeeded to do mounts according to fstab. I could try fixing permissions, like drewski_1 suggested.
Click to expand...
Click to collapse
Yes, the fstab looks fine. The error message could indicate an issue with the contents of /system/lib or the BOOTCLASSPATH environment variable. However I have no idea how that could have been damaged by reinstalling your "external" ROM. I'd start investigating with:
Code:
adb shell
echo $BOOTCLASSPATH
ls -l /system/lib
and compare the output with a "known good" ROM.
dolphin with flash
First I would like thank the people that have taken time out of their lives to work on these roms. They are a lifesaver for this tablet.
I have been having trouble playing flash within the dolphin browser.
I have been sure to go into the settings and ensure that flash is enabled.
example: when I go to a website like twitch I get a message that tells me that I need adobe flash to watch this video
It was my understanding that the dolphin browser that is installed when flashing the rom includes the flash.
Thanks in advance to clearing this up for me.
With grimlock 4.0 using pegasusq and deadline and aggressive preset ram management, I am scoring almost 23000 in antutu and the device is absolute butter.
When using nova launcher only for this ROM, where do I set the additional quick settings panel icons? For example, I want to add torch to the quick setting panel toggles.
Swap File
Can we have a swap file to increase ram in grimlock kernel?
Thanks,
Keshav
Wrong thread sorry
pmgnet said:
When using nova launcher only for this ROM, where do I set the additional quick settings panel icons? For example, I want to add torch to the quick setting panel toggles.
Click to expand...
Click to collapse
When you open the quick settings panels you will see an icon with a pencil pointing into a small square. When you touch this is gives the option to add or remove icons from the quick settings panel.
As an aside, sorry if we were not too quick to reply to questions in this thread, as we didn't even know this Q&A thread existed until about 5 minutes ago. XDA bots are sneakier than the NSA!

[Q&A] Running Ubuntu natively on the Shield Tablet

Q&A for Running Ubuntu natively on the Shield Tablet
Some developers prefer that questions remain separate from their main development thread to help keep things organized. Placing your question within this thread will increase its chances of being answered by a member of the community or by the developer.
Before posting, please use the forum search and read through the discussion thread for Running Ubuntu natively on the Shield Tablet. If you can't find an answer, post it here, being sure to give as much information as possible (firmware version, steps to reproduce, logcat if available) so that you can get help.
Thanks for understanding and for helping to keep XDA neat and tidy!
It's amazing
Wow, it is really great that we will be able to run Ubuntu on the Shield!!
As of now, how would you describe the performance of it? Is it laggy or running smoothly? Also, do I understand correctly from your fist post that wifi is not working? Is there other functions not working?
dual boot
Also, as someone managed to get an android /ubuntu dual boot?
Teve1982 said:
Wow, it is really great that we will be able to run Ubuntu on the Shield!!
As of now, how would you describe the performance of it? Is it laggy or running smoothly? Also, do I understand correctly from your fist post that wifi is not working? Is there other functions not working?
Click to expand...
Click to collapse
it works well enough, I don't have anything to compare it to but it's not slow or anything
WiFi and Bluetooth work now. Touchscreen doesn't work, and I don't know yet if it ever will on Linux. Touchscreen works too!
Teve1982 said:
Also, as someone managed to get an android /ubuntu dual boot?
Click to expand...
Click to collapse
it's already dual boot, Linux stays in its own directory on the userdata partition
miscellaneous info
Hi guys, I'm totally noob with linux and ubuntu so my question may be stupid:
How Can I dualboot lollipop and ubuntu on the shield tablet?
If I use the img linked here what is the command that I must use to flash on tablet? I need only that file or I need something else?
I saw that the image kernel file is updated frequently to implement new feature, how can I upgrade to a new version?
Thanks a lot and be patient with me
Polve72
Interest is peaked.
Sent from Bad Azz VZW LG G3 Cyan Tapatalk
Unable to complete boot
Hey guys,
so i followed the instructions to the letter, or at least i think so.
1. downloaded the latest boot image. new_boot(94)
2. downloaded , unpacked and repacked the files from nvidia as explained
3. transferred repacked bz2 file to device, unpacked in /data/linux/
4. booted using fastboot command with command extra command line arguement.
given that i add the extra command line argument, then ubuntu seems to boot fine, but it stops after a while with the last report being :
"enable autosuspend for nvidia bruce"
nothing seems to be happening after that...
i have tried the two previous boot images also, but the same thing happens... any ideas?
Ubuntu issues
Hey,
I tried following the directions on the post. I got the device rooted and unlocked the bootloader, cwm is installed, busybox is installed, and root checker says I am rooted. I also followed the directions and have the root file system moved across into /data. When I use fastboot to load the image, I get a kernel panic. Things are scrolling pretty quickly but it looks like the busybox operations that are trying to mount certain areas keep failing saying no such file or directory. It almost seems like from the bootloader, it can't see /data, however I am able to mount it via cwm and see the files are there via adb. One of the error messages I got on the boot was that "mount /dev/mmcblk0p24 on /data failed invalid argument". Would you have any idea what I might be missing here. One thing I did notice while following the directions was that sudo ./apply_binaries.sh did not seem to do anything, it just displays the usage info like it was expecting different arguments.
Any suggestions you have for me would be much appreciated.
Thanks.
polve72 said:
Hi guys, I'm totally noob with linux and ubuntu so my question may be stupid:
How Can I dualboot lollipop and ubuntu on the shield tablet?
If I use the img linked here what is the command that I must use to flash on tablet? I need only that file or I need something else?
I saw that the image kernel file is updated frequently to implement new feature, how can I upgrade to a new version?
Thanks a lot and be patient with me
Polve72
Click to expand...
Click to collapse
At the moment, I honestly can't recommend trying this if you have no Linux experience, it's still WIP (for example, the touchscreen and Bluetooth won't work without additional configuration), and this is still ARM so most closed-source software (such as most games) still won't work (at least not at acceptable performance levels). But, if you still want to try, you need to follow the instructions from the post that contains the boot.img downloads (mainly the rootfs part). At the moment there's no real solution for dual-booting, but it's possible to flash the boot.img to the recovery partition (after which, booting the recovery will go to Linux instead). Good luck!
dud3rin0 said:
Hey guys,
so i followed the instructions to the letter, or at least i think so.
1. downloaded the latest boot image. new_boot(94)
2. downloaded , unpacked and repacked the files from nvidia as explained
3. transferred repacked bz2 file to device, unpacked in /data/linux/
4. booted using fastboot command with command extra command line arguement.
given that i add the extra command line argument, then ubuntu seems to boot fine, but it stops after a while with the last report being :
"enable autosuspend for nvidia bruce"
nothing seems to be happening after that...
i have tried the two previous boot images also, but the same thing happens... any ideas?
Click to expand...
Click to collapse
Can you please post a picture of the screen when it gets stuck? (the bruce message usually appears after the rootfs is mounted, so since it doesn't continue, that probably failed). apply-binaries.sh should work fine, if it didn't run I think it would still boot, but there will be no GPU acceleration for sure (and maybe no X11 at all).
jfsir said:
Hey,
I tried following the directions on the post. I got the device rooted and unlocked the bootloader, cwm is installed, busybox is installed, and root checker says I am rooted. I also followed the directions and have the root file system moved across into /data. When I use fastboot to load the image, I get a kernel panic. Things are scrolling pretty quickly but it looks like the busybox operations that are trying to mount certain areas keep failing saying no such file or directory. It almost seems like from the bootloader, it can't see /data, however I am able to mount it via cwm and see the files are there via adb. One of the error messages I got on the boot was that "mount /dev/mmcblk0p24 on /data failed invalid argument". Would you have any idea what I might be missing here. One thing I did notice while following the directions was that sudo ./apply_binaries.sh did not seem to do anything, it just displays the usage info like it was expecting different arguments.
Any suggestions you have for me would be much appreciated.
Thanks.
Click to expand...
Click to collapse
It's possible that your internal memory isn't recognized by the kernel. I'll send you a PM later today with a custom kernel so that we can start debugging this, I've had this issue before but I'm pretty sure I fixed it early on.
@Bogdacutu
I think you'll right. I'll wait a better and more user friendly approach.
Polve72
Thanks. Any help is much appreciated.
Thank you
@Bogdacutu Thank you very much for this!!!! buntu runs fairly smooth on my Tablet. But how will you get x86 software run on ARM? I thought there is no way.
Best Regards
aarr_ee said:
@Bogdacutu Thank you very much for this!!!! buntu runs fairly smooth on my Tablet. But how will you get x86 software run on ARM? I thought there is no way.
Best Regards
Click to expand...
Click to collapse
qemu can run in userspace (so it can run x86 software relatively seamlessly without a full VM), but x86 apps can't load ARM libraries, so x86 apps don't have direct rendering (which slows them down even more than they are already)
Portable
Is there any way to make this possible for the Shield Portable?
Great project,
Are you able to play any linux games with decent fps? I ask because ive found following video:
https://www.youtube.com/watch?v=hRBPeNzE558
thewolf16 said:
Great project,
Are you able to play any linux games with decent fps? I ask because ive found following video:
https://www.youtube.com/watch?v=hRBPeNzE558
Click to expand...
Click to collapse
Pretty much any game compiled for ARM will work, so Steam games won't work without QEMU (and so far I haven't been able to get Steam to actually start properly), which would mean some performance loss.
Thank you for your answer
Will this work with your build?:
https://www.youtube.com/watch?v=uVknjU7eGbI
https://www.youtube.com/watch?v=4GUP27TJ5w4
This would be much faster than qemu.
EDIT: And can you run the 2D adventure game "Edna & Harvey: The breakout". Its an windows game but because its made in java you can run it natively on linux with the java-installer:
java -jar ednaunpack.jar
Click to expand...
Click to collapse
thewolf16 said:
Thank you for your answer
Will this work with your build?:
https://www.youtube.com/watch?v=uVknjU7eGbI
https://www.youtube.com/watch?v=4GUP27TJ5w4
This would be much faster than qemu.
Click to expand...
Click to collapse
Probably. I'm not planning to pay for that anytime soon as I really dislike their licensing scheme, so I can't know for sure if it works or not.
EDIT: decided to buy it, apparently they don't give you the license automatically, so I might have to wait a day or so until I get it
Not Enabled Bluetooth...
Hi,
I have the SHIELD TABLET 16GB Wi-Fi model and succeeded to run Ubuntu with new_boot(123).img!
Recently, I try to the bluetooth configuration to use bluetooth keyboard. However I cannot enable bluetooth.
To enable bluetooth, I do the following commands on terminal.
Code:
sudo aptitude install bluetooth bluez-hcidump bluewho bluez-tools blueman
git clone https://code.google.com/p/broadcom-bluetooth/
cd broadcom-bluetooth
make brcm_patchram_plus
sudo cp brcm_patchram_plus /usr/local/bin
sudo brcm_patchram_plus -d --patchram /system/etc/firmware/bcm43241.hcd --baudrate 3000000 --enable_lpm --enable_hci --use_baudrate_for_download --no2bytes --tosleep 1000 /dev/ttyTHS2
After brcm_patchram_plus, these message is shown.
Code:
option patchram with arg /system/etc/firmware/bcm43241.hcd
option baudrate with arg 3000000
option enable_lpm
option enable_hci
option use_baudrate_for_download
option no2bytes
option tosleep with arg 1000
/dev/ttyTHS2
writing
01 03 0c 00
writing
01 03 0c 00
(...looping)
The last 2 lines are looping until do Ctrl-C on terminal.
So I try to change the bluetooth setting from "OFF" to "ON" on the Unity's System Setting Panel.
After that, I retry the brcm_patchram_plus command and its output message is changed as bellow.
Code:
...
writing
01 18 fc 06 00 00 c0 c6 2d 00
received 7
04 0e 04 01 18 fc 00
Done setting baudrate
writing
01 27 fc 0c 01 01 01 01 01 01 01 00 00 00 00 00
received 7
04 0e 04 01 27 fc 00
Done setting line discpline
the brcm_patchram_plus doesn't finish until Ctrl-C. In this state, I can open the "Bluetooth New Device Setup" Panel.
However, I cannot find any bluetooth devices...(attatched picture) So I open the other terminal and type some commands.
Code:
$ hciconfig -a
hci0: Type: BR/EDR Bus: UART
BD Address: 43:24:1B:00:00:00 ACL MTU: 1021:8 SCO MTU: 64:1
DOWN
RX bytes:642 acl:0 sco:0 events:36 errors:0
TX bytes:983 acl:0 sco:0 commands:38 errors:0
Features: 0xbf 0xfe 0xcf 0xfe 0xdb 0xff 0x7b 0x87
Packet type: Dm1 DM3 Dm5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH SNIFF
Link mode: SLAVE ACCEPT
$ hcitool dev
Devices:
$ rfkill list
0: bluedroid_pm: Bluetooth
Soft blocked: yes
Hard blocked: no
1: phy0 Wreless LAN
Soft blocked: no
Hard blocked: no
2: brcmfmac-wifi: Wireless LAN
Soft blocked: no
Hard blocked: no
4: hci0: Bluetooth
Soft blocked: yes
Hard blocked: no
$ rfkill unblock all
$ rfkill list
0: bluedroid_pm: Bluetooth
Soft blocked: no
Hard blocked: no
1: phy0 Wreless LAN
Soft blocked: no
Hard blocked: no
2: brcmfmac-wifi: Wireless LAN
Soft blocked: no
Hard blocked: no
4: hci0: Bluetooth
Soft blocked: no
Hard blocked: no
$ hcitool scan
Device si no available: No such device
Please give me any advices!
Thanks,
How to make a keyboard and mouse work on it?
Thanks

Root and Encryption

Hello,
I've a galaxy s6 with stock rom. I've rooted my device and I like to encrypt my device. But when I do so, it stuck on the encryption screen for 1 day. When rebooting, the device tell me to wipe the phone because of a failure of encryption.
Is there any solution?
thanks in advance...
vipinholland said:
Hello,
I've a galaxy s6 with stock rom. I've rooted my device and I like to encrypt my device. But when I do so, it sucks on the encryption screen for 1 day. When rebooting, the device tell me to wipe the phone because of a failure of encryption.
Is there any solution?
thanks in advance...
Click to expand...
Click to collapse
Have the exact same problem, haven't found any solution yet :/
Had the same issue and had to reset all data.
Worked for me by booting into safe mode and disabling the daemonsu processes as described in this post: http://forum.xda-developers.com/showpost.php?p=61017472&postcount=6
pkill did not work for me, hence I used ps and kill in adb shell (the pid numbers will vary):
# ps | grep "daemonsu"
-->
root 2988 1 4004 280 0072bb78 99a78be0 S daemonsu:mount:master
root 3220 1 6052 492 ffffffff 99a78be0 S daemonsu:master
root 10217 3220 10148 664 ffffffff 99a78be0 S daemonsu:0
root 10228 10217 10148 1024 001d22bc 99a79468 S daemonsu:0:10213
# kill 2988
# kill 3220
# kill 10217
# kill 10228

[Method] Automate the Theater Mode

******************************
A late note:
below contents were written in May2015, after some days I paid my attention to other things (now Oct2015).
If you are new to read, and really interested to achieve this, you may also read the following comments, which may contain some new thoughts/ better methods.
Currently my new watch system is not rooted and am not so hungry on battery. But I promise I will be back to tidy through when I got spare time.
Thanks again for reading.
******************************
I got a way to automate the "Theater mode" of my watch.
I would like my wear to auto switch to "Theater mode" at night and exit every morning to save battery. (Just too lazy to remember to switch it when sleeping ). The real problems are ①google doesn't provide an API for developers ②currently no good method to execute native standalone command on watch.
My basic idea is to simulate a double tap on power button using shell. This would not be that difficult like ②..
Seems current apps don't provide such function: like autowear, weartasker,tasker for wear.... none of them provide a function of executing command on watch.
Then I used thread of gusano38 to apply a debugging of wear from phone (pretend as a PC).
Besides, there is another thread of joschi70 on wearshell, I don't know much about bean shell, so no idea whether it can modify wear setting rather than just retrieving info.
Here are the detailed steps:
Your phones should be rooted.
A. One time record
1. debug your watch (turn on in watch developer opition)
2. use "getevent" to find "bcmpmu_on" related event, in my case, event2
3. run command "cat /dev/input/event2 > /sdcard/doubletap", double tap your power button, then use control-C to stop the command
4. There should be a "doubletap” located in you watch /sdcard
use "cat /sdcard/doubletap > /dev/input/event2" to run and test if it is working
B. After you finish step A, you can always use the following code to trigger current Theater mode
allow bluetooth debugging
Code:
[COLOR="gray"]su
adb kill-server
export HOME=/sdcard
setprop service.adb.tcp.port 5555
stop adbd
start adbd
adb forward tcp:4444 localabstract:/adb-hub
adb connect localhost:4444
sleep 2
adb -s localhost:4444 shell "input keyevent 26; cat /sdcard/doubletap > /dev/input/event2"
setprop service.adb.tcp.port -1
stop adbd
start adbd
adb kill-server
exit[/COLOR]
Also recorded a short demo video
Note: NOT recommended for daily use, maybe you prefer a simple hardware tap, but here debugging mode may make your wear unsafe (therefore this is permanent notification)
=========================================================
It has been some time since my above post, I tried beanshell and finally solved my own problem.
The disadvantage of debug is unsafe, permanent notification, and delay(e.g. my above codes need wait 2s for adb service to be ready). No one if use wearshell.
main code
Code:
import java.lang.Runtime;
import java.io.DataOutputStream;
Process su = Runtime.getRuntime().exec("su");
DataOutputStream outputStream = new DataOutputStream(su.getOutputStream());
outputStream.writeBytes("input keyevent 26;cat /sdcard/doubletap>/dev/input/event2;");
outputStream.flush();
outputStream.writeBytes("exit\n");
outputStream.flush();
su.waitFor();
How:
Step B:
1. install wearshell
2. Prepare above main code, you can either
save to a file (e.g. doubletap.bsh) in /sdcard of watch, and call the through source("/sdcard/doubletap.bsh")
or
directly run (sometimes need to combine into one line like intent)
3. use intent to call: de.fun2code.android.wear.shell.EXEC with extra "bsh".
Now you are free to use it daily!
{
"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"
}
============================================================
This is a third update: I grayed the ADB part of first post for not confusing. This time I show how I used it.
Basically I make my watch into Theater mode and turn off Bluetooth of my phone at night. In the morning do the opposite things:
Just skip the run shell step which kills "bluetooh share" app (my phone has some problem with BT).
This is just one part pf my day/night switch tasks e.g. I also have auto airplane mode and interruption mode. By the way, I don't use airplane mode to turn off bluetooth. Simply because I want my watch to connect a little longer. To do that, you can set "airplane radios" so that you decide whether or not to turn off wifi/bluetooth/etc when you go to airplane mode.
This should save battery a little if not too much. Your decision if it helps you.
my one day sample:
I was searching a solution for this.. However this is still not a daily solution! However this puts a few steps closer at least. Thanks
Sent from my SM-G920F using Tapatalk
I have updated. wearshell worth to try.
qingtest said:
I have updated. wearshell worth to try.
Click to expand...
Click to collapse
This project looks great since it would let me automate activating theater mode with Tasker and I haven't found any other ways to do it. If I understand your post correctly, I need to save the code to a file and save on my watch's storage. How do I copy the file there?
I installed the wearshell , then placed the file with the code named doubletap.bsh in watch sdcard folder and created intent in tasker exactly like in the screenshot and nothing.. The intent goes as it should (green dot on tasker) but the watch still the same..
Sent from my SM-G920F using Tapatalk
if you have sony smart watch 3 like me, can simply plug in your usb cable, otherwise I think can use Debugging over Bluetooth.
then use "adb push" to transfer the file.
In tasker the target is Activity/Service, not BroadcastReceiver.
if this does not solve, can you just paste the codes to web shell page (can also insert 'echo xxx;'), see if there is any output or error?
If error maybe it is the root permission, as you can see my sample code needs su.
well I think the key simulation function may not necessarily need root, but I had my watch rooted (my default). You can either root watch or make a little change to the java codes (so that not requiring root permission).
qingtest said:
In tasker the target is Activity/Service, not BroadcastReceiver.
if this does not solve, can you just paste the codes to web shell page (can also insert 'echo xxx;'), see if there is any output or error?
If error maybe it is the root permission, as you can see my sample code needs su.
well I think the key simulation function may not necessarily need root, but I had my watch rooted (my default). You can either root watch or make a little change to the java codes (so that not requiring root permission).
Click to expand...
Click to collapse
I was using target as activity.
The watch wakes up the screen like if o touched it in normal mode, but nothing else.
My watch it is supposed to be rooted.. I get the # when using shell, but when I saw on code that had SU it was my first though that it might not be rooted.
What changes you suggest for the code? I'm a bit dumb on code since I'm a basic self learner...
Sent from my SM-G920F using Tapatalk
It should work. For problem shooting purpose I guest you check shell and beanshell separately.
1. Make sure adb works in the command window.
The first command "input" is to simulate power press, it should 100% work.
The second command "cat" is to simulate double press, if not working you need to redo the recording.
2. Run beanshell with any command like "echo aaa" in the webpage it should 100% work [edit: print("aaa");]
3. Run my code in webpage, should work
4. Put in tasker
Let me know which step you cannot go through.
qingtest said:
It should work. For problem shooting purpose I guest you check shell and beanshell separately.
1. Make sure adb works in the command window.
The first command "input" is to simulate power press, it should 100% work.
The second command "cat" is to simulate double press, if not working you need to redo the recording.
2. Run beanshell with any command like "echo aaa" in the webpage it should 100% work
3. Run my code in webpage, should work
4. Put in tasker
Let me know which step you cannot go through.
Click to expand...
Click to collapse
I'm having problem right on the second command... using "adb shell cat /sdcard/doubletap>/dev/input/event2" returns in command prompt "The system cannot find the path specified"... however I have triple checked and I have the file doubletap.bsh in the SDCARD folder....
I pushed the doubletap.bsh file to /sdcard and it's not working for me. Running a task with the intent doesn't do anything despite showing the green dot. My watch isn't rooted so I'm sure that's a factor. When I run the code on the web interface this is the error I get
BeanShell: error code bsh.TargetError: Sourced file: inline evaluation of: ``import java.lang.Runtime; import java.io.DataOutputStream; Process su = Runtime. . . . '' : Typed variable declaration : Method Invocation exec : at Line: 3 : in file: inline evaluation of: ``import java.lang.Runtime; import java.io.DataOutputStream; Process su = Runtime. . . . '' : .exec ( "su" )
Target exception: java.io.IOException: Error running exec(). Command: [su] Working Directory: null Environment: null
Click to expand...
Click to collapse
I tried removing what I thought was calling on su permissions but couldn't get it to work, but it may just be poor syntax. Do you know what the code would be if it's not using su?
Edit:
I can't even get the echo beanshell command to run. When I enter 'echo aaa' in the webpage I get the following:
BeanShell: error code bsh.EvalError: Sourced file: inline evaluation of: ``echo aaa ;'' : Typed variable declaration : Class: echo not found in namespace : at Line: 1 : in file: inline evaluation of: ``echo aaa ;'' : echo
Click to expand...
Click to collapse
there are two files 1. doubletap 2. doubletap.bsh.
The first one includes is generated following my step A, did you check it?
sorry "echo" is only for bash.. if you are running beanshell it should be print("aaa"); which work 100%
qingtest said:
there are two files 1. doubletap 2. doubletap.bsh.
The first one includes is generated following my step A, did you check it?
Click to expand...
Click to collapse
Thanks but I'm still overlooking something.
A. One time record
1. debug your watch (turn on in watch developer opition)
2. use "getevent" to find "bcmpmu_on" related event, in my case, event2
3. run command "cat /dev/input/event2 > /sdcard/doubletap", double tap your power button, then use control-C to stop the command
4. There should be a "doubletap” located in you watch /sdcard
use "cat /sdcard/doubletap > /dev/input/event2" to run and test if it is working
Click to expand...
Click to collapse
I need to do the above first even if I'm not using the run shell command, correct? I have my watch set to ADB debugging on, but where am I entering the commands? I'm sure I'm just not understanding what to do.
qingtest said:
A. One time record
1. debug your watch (turn on in watch developer opition)
2. use "getevent" to find "bcmpmu_on" related event, in my case, event2
3. run command "cat /dev/input/event2 > /sdcard/doubletap", double tap your power button, then use control-C to stop the command
4. There should be a "doubletap” located in you watch /sdcard
use "cat /sdcard/doubletap > /dev/input/event2" to run and test if it is working
Click to expand...
Click to collapse
I assumed we could do B without A, so I guess this was the mistake.
Still I'm lacking some knowleage to where we do this and how..
Where we go for one time record and where we run all this steps? ADB to use the "getevent" and the command?
If you could ptovide some more baby steps would be helpfull! thanks
EDITk, I guess I figured it out partially
WIth command prompt and watch screen ON run "adb shell getevent" and while running double press the button (to induce theater mode).
In my phone it showed up like this in the command prompt when I double pressed the button:
I don't get the "bcmpmu_on" on any event but rater "gpnp_pon"
could not open /dev/input/event0, Out of memory
add device 1: /dev/input/event10
name: "ssp_context"
add device 2: /dev/input/event9
name: "tilt_wake_sensor"
add device 3: /dev/input/event8
name: "hrm_lib_sensor"
add device 4: /dev/input/event7
name: "meta_event"
add device 5: /dev/input/event6
name: "step_cnt_sensor"
add device 6: /dev/input/event5
name: "uncal_gyro_sensor"
add device 7: /dev/input/event4
name: "sig_motion_sensor"
add device 8: /dev/input/event3
name: "uncal_geomagnetic_sensor"
add device 9: /dev/input/event2
name: "geomagnetic_sensor"
add device 10: /dev/input/event1
name: "qpnp_pon"
/dev/input/event1: 0001 0074 00000001
/dev/input/event1: 0000 0000 00000000
/dev/input/event1: 0001 0074 00000000
/dev/input/event1: 0000 0000 00000000
/dev/input/event1: 0001 0074 00000001
/dev/input/event1: 0000 0000 00000000
/dev/input/event1: 0001 0074 00000000
/dev/input/event1: 0000 0000 00000000
NOw it's here I'm kind of stuck.. now Im trying to use in the command prompt :
adb shell sendevent cat /dev/input/event1 > /sdcard/doubletap
I event tried
adb shell su sendevent cat /dev/input/event1 > /sdcard/doubletap
and it's returning
"The system cannot find the specified path"
what I'm I missing?
insaned said:
I assumed we could do B without A, so I guess this was the mistake.
Still I'm lacking some knowleage to where we do this and how..
Where we go for one time record and where we run all this steps? ADB to use the "getevent" and the command?
If you could ptovide some more baby steps would be helpfull! thanks
EDITk, I guess I figured it out partially
WIth command prompt and watch screen ON run "adb shell getevent" and while running double press the button (to induce theater mode).
In my phone it showed up like this in the command prompt when I double pressed the button:
I don't get the "bcmpmu_on" on any event but rater "gpnp_pon"
could not open /dev/input/event0, Out of memory
add device 1: /dev/input/event10
name: "ssp_context"
add device 2: /dev/input/event9
name: "tilt_wake_sensor"
add device 3: /dev/input/event8
name: "hrm_lib_sensor"
add device 4: /dev/input/event7
name: "meta_event"
add device 5: /dev/input/event6
name: "step_cnt_sensor"
add device 6: /dev/input/event5
name: "uncal_gyro_sensor"
add device 7: /dev/input/event4
name: "sig_motion_sensor"
add device 8: /dev/input/event3
name: "uncal_geomagnetic_sensor"
add device 9: /dev/input/event2
name: "geomagnetic_sensor"
add device 10: /dev/input/event1
name: "qpnp_pon"
/dev/input/event1: 0001 0074 00000001
/dev/input/event1: 0000 0000 00000000
/dev/input/event1: 0001 0074 00000000
/dev/input/event1: 0000 0000 00000000
/dev/input/event1: 0001 0074 00000001
/dev/input/event1: 0000 0000 00000000
/dev/input/event1: 0001 0074 00000000
/dev/input/event1: 0000 0000 00000000
NOw it's here I'm kind of stuck.. now Im trying to use in the command prompt :
adb shell sendevent cat /dev/input/event1 > /sdcard/doubletap
I event tried
adb shell su sendevent cat /dev/input/event1 > /sdcard/doubletap
and it's returning
"The system cannot find the specified path"
what I'm I missing?
Click to expand...
Click to collapse
I'm stuck at the same place you are. When I run "adb shell getevent" from the command prompt I get results that show "gpnp_pon" for event1 and there's no "bcmpmu_on". So I've tried "adb shell sendevent cat /dev/input/event1 > /sdcard/doubletap" and "adb cat /dev/input/event1 > /sdcard/doubletap" and both give me the same error, "The system cannot find the path specified."
Hi I hoped to make it clear but was too lazy to wrote every detail where I assume readers were familiar with adb.
This is the answer for you two:
①You should know the basic idea is to simulate keypress.
The "input keyevent" does not have the ability to simulate a double tap, that's why we need to use adb to record.
The recorded data is put in the file "doubletap"
②From your question, I guess you are not so familiar with cmd right?
If you run "adb cat /dev/input/event1 > /sdcard/doubletap" in dos cmd, it will actually only run the command "cat /dev/input/event1 " and retrieve the result then write to a file "/sdcard/double" in windows. However, windows does not have such a path, that's why error is reported.
③ sorry I only have played with my own watch, I think the one ‘**on’ should be equivalent to my 'bcmpmu_on'.
④ To do it right, you need to quote the command like this: adb shell "cat /dev/input/event1 > /sdcard/doubletap"
Or first go into adb shell ,then run the command (like below picture)
↑After double press, press Ctrl+C to stop. Then adb will exit with "^C"
The file should already in /sdcard/, can check like below: (in your case doubletap)
Now you can simply run below command to test. should toggle theater mode 100%: (in your case doubletap)
qingtest said:
Hi I hoped to make it clear but was too lazy to wrote every detail where I assume readers were familiar with adb.
This is the answer for you two:
①You should know the basic idea is to simulate keypress.
The "input keyevent" does not have the ability to simulate a double tap, that's why we need to use adb to record.
The recorded data is put in the file "doubletap"
②From your question, I guess you are not so familiar with cmd right?
If you run "adb cat /dev/input/event1 > /sdcard/doubletap" in dos cmd, it will actually only run the command "cat /dev/input/event1 " and retrieve the result then write to a file "/sdcard/double" in windows. However, windows does not have such a path, that's why error is reported.
③ sorry I only have played with my own watch, I think the one ‘**on’ should be equivalent to my 'bcmpmu_on'.
④ To do it right, you need to quote the command like this: adb shell "cat /dev/input/event1 > /sdcard/doubletap"
Or first go into adb shell ,then run the command (like below picture)
↑After double press, press Ctrl+C to stop. Then adb will exit with "^C"
The file should already in /sdcard/, can check like below: (in your case doubletap)
Now you can simply run below command to test. should toggle theater mode 100%: (in your case doubletap)
Click to expand...
Click to collapse
I'm familiar with command prompt and know the basics with adb. I guess it was confusing that some of the steps were very detailed so I could do exactly what you wrote, but some steps were missing things and I didn't realize it. Thank you for your patience.
After doing what was in your last post I'm able to toggle theater mode from adb on my laptop while my laptop is connected, so that's great. However doing it from the Wearshell intent still doesn't work. I copied the code you posted and changed event2 to event1, but I'm pretty sure the problem is that your code uses su and my watch is not rooted. Do you know what the code would look like without using root?
This is the error I got from Wearshell
BeanShell: error code bsh.TargetError: Sourced file: inline evaluation of: ``import java.lang.Runtime; import java.io.DataOutputStream; Process su = Runtime. . . . '' : Typed variable declaration : Method Invocation exec : at Line: 3 : in file: inline evaluation of: ``import java.lang.Runtime; import java.io.DataOutputStream; Process su = Runtime. . . . '' : .exec ( "su" )
Target exception: java.io.IOException: Error running exec(). Command: [su] Working Directory: null Environment: null
Click to expand...
Click to collapse
I just updated my watch to 5.1.1, so lost root. The code is no longer working for me either. I confirm the input and cat do not necessarily need su permission.
However, I don't have an existing code for you ( i am relative new in beanshell too). Will try and share with my spare time (you are welcome to do so too )
Thanks a million for the patience to the detailed adb explanation which helped a lot!
Already working both in Adb, Wearshell and tasker intent. I have the Watch rooted..
However I DID a slight change to the code, I had to remove the " input keyevent 26" from the line, because it was causing only the screen to turn on and without it works great. The double tap on the button for theater mode doesn't need screen on anyway, so I gave it a shot to remove and it worked.
import java.lang.Runtime;
import java.io.DataOutputStream;
Process su = Runtime.getRuntime().exec("su");
DataOutputStream outputStream = new DataOutputStream(su.getOutputStream());
outputStream.writeBytes("cat /sdcard/doubletap>/dev/input/event1;");
outputStream.flush();
outputStream.writeBytes("exit\n");
outputStream.flush();
su.waitFor();
Click to expand...
Click to collapse

Categories

Resources