This guide works for 7.0 and 8.0 on any variant of the S8/S8+/Note 8.
You will need ADB installed on your computer first. You can find several guides online for this.
1. Pick an app to remap (ill be using Google Camera)
2. Find the Component ID for this app. Open the app to the page you want and run this command with ADB.
Code:
adb shell "dumpsys window windows | grep -E 'mCurrentFocus|mFocusedApp'"
Now look for this part of the output:
Code:
mCurrentFocus=Window{afcbfbb u0 [B][U]com.google.android.GoogleCamera/com.android.camera.CameraLauncher[/U][/B]}
The bolded and underlined part is what we need. Copy that somewhere for later.
3. Now, run this command to set the new component as our double press action.
Code:
adb shell "settings put system double_tab_launch_component [B][U]com.google.android.GoogleCamera/com.android.camera.CameraLauncher[/U][/B]"
Replace the component ID with the one we found in step 2. The example above sets it to Google Camera.
4. REBOOT
5. Profit!
To return to the default camera action, run this:
Code:
adb shell "settings put system double_tab_launch_component com.sec.android.app.camera/com.sec.android.app.camera.Camera
If you've got questions, ask me below. Enjoy~!
Bixby button
Can you do this with bixby button I removed with adb pm remapping apps not working?
Thanks for posting! Is there a way to get this to work with a system service (not an app), such as the flashlight?
Thanks for posting this. I set it up to open the google camera, and it worked. Unfortunately, it doesn't seem to survive reboot.
Did not work on Galaxy S8, Oreo
I also tried other apps except Google Cam, didn't work. I tried with su in ADB, didn't work. Suggestions?
Worked fine for me! Just don't forget to leave the double press option in the samsung camera app ON!
infact, I used tasker secondary app to launch ANY tasker task with double press.
use:
adb shell "settings put system double_tab_launch_component net.dinglisch.android.taskerm/com.joaomgcd.taskerm.util.ActivitySecondaryApp"
reboot, and then let the phone rest for a minute so that tasker can load its processes.
Related
So I was messing around with some of the system files, just trying to learn more about everything and I decided to do a wipe to put everything back to where it was and after I wiped, it gave me an error message at bootup saying that the gapps process had to be closed. I went through the regular sign in and when I got to the main screen, the screen was black. I get the top bar but nothing else.
So I tried reinstalling JFRC33 Lite. Same thing. So I tried installing JFRC33 regular. Now I cant even get by the blinking android. I dont know what the heck is going on but I know all is not lost because I can still et to the bootloader. Can anyone help me out?
Thanks.
try putting one of the updates on your SD card and naming update.zip, and then access the phone via adb shell(if you can) if you can see it with adb devices then type "adb shell wipe all" it will COMPLETELY wipe your phone and allow you to reinstall your update, you cshould be good as root after that, if not then try a .nbh file
tubaking182 said:
try putting one of the updates on your SD card and naming update.zip, and then access the phone via adb shell(if you can) if you can see it with adb devices then type "adb shell wipe all" it will COMPLETELY wipe your phone and allow you to reinstall your update, you cshould be good as root after that, if not then try a .nbh file
Click to expand...
Click to collapse
Thanks bro! I had no idea you could wipe through the pc.
one of the many things i found when i was trying to control the phone with my computer. i have a script that when i run it on my comp it auto starts tetherbot and hits the up key on the trackball then hits enter to start the proxy, then does the adb forward tcp command and then starts firefox with all the correct settings. i also found a very complicated way to send texts with my phone using my comp keyboard and adb
tubaking182 said:
one of the many things i found when i was trying to control the phone with my computer. i have a script that when i run it on my comp it auto starts tetherbot and hits the up key on the trackball then hits enter to start the proxy, then does the adb forward tcp command and then starts firefox with all the correct settings. i also found a very complicated way to send texts with my phone using my comp keyboard and adb
Click to expand...
Click to collapse
Oh? Please share. I'm very interested in ways to control the phone from the pc.
Thanks
for the time being it is not an exact science, you need a key map(one found in my thread about the computer app to control phone) and you need to know a few commands. basically to get the phone to think you pressed a button you need to have the computer send the command: adb shell keyevent ## where ## is the number that corresponds to the key you want it to press on the phone. keys are labled 0-85 but i still have yet to figure out what 0 does and a few of the keys don't work perfectly yet but that's being worked on.
secxond you need the command "adb shell am start -a android.intent.action.MAIN -n (*********/*********)" where the *******/******* equals the program you want to start. for Steel you would type:
adb shell am start -a android.intent.action.MAIN -n com.kolbysoft.steel/com.kolbysoft.steel.Steel
that will bring up steel to your home page, after that you can type adn shell input (keyevent|text) if you do text the phone only reads one word, not sure why but i am trying to fix that as well, and if you do keyevent then you need to know what number corresponds to the key you want pressed
here is an example of a script that will start tetherbot, start the socks service, and do the tcp forwarding action
#!/bin/bash
adb shell am start -a android.intent.action.MAIN -n graha.ms.tunnel/graha.ms.tunnel.TunnelConfig ##start new instance of tetherbot or bring current one to front
adb shell input keyevent 19 ###press up
adb shell input keyevent 66 ###press enter
sleep 3
adb forward tcp:1080 tcp:1080
all the commands i have found so far i got by running adb shell logcat and reading the output as i click on different applications. if you need some help with this then i would be more than happy to help, just make sure to let me know what program you are trying to run(if it's a paid app then you will need to run logcat and attach the output after running the app) if it's a free app i'll just install it and let you know how to start the app, then you can write scripts to get your phone to do certain things. i already have a script that wipes my phone, reapplys apps to SD and resets my settings, it's kinda messy but it works
For those that like having backlight on for their keyboard make the following changes on your phone. By default this is not enabled in Haykuro's Hero build.
ADB
adb shell cp /system/lib/hw/lights.msm7k /system/lib/hw/lights.trout.so
adb shell reboot
FROM TERMINAL
cp /system/lib/hw/lights.msm7k /system/lib/hw/lights.trout.so
*since you can't reboot from terminal anymore, go ahead and power down your phone, then turn it back on.
Now you can go Messaging or whatever app, open your keyboard and the backlight works.
FYI, I've sent this fix to JustAnotherCrowd so he has it in his ROM already for those of you that don't want to do this yourself.
It's always worked for me?
Auctionedllama said:
It's always worked for me?
Click to expand...
Click to collapse
Which build did you install? It shouldn't have worked in Haykuro's
Reboot
just as a quick reference or alternative:
CALL (green) + MENU + END (red)
to reboot. I find it a little bit faster than typing reboot in the emu when you get the muscle memory taken care of.
For those that like having backlight on for their keyboard make the following changes on your phone. By default this is not enabled in Haykuro's Hero build.
ADB
adb shell cp /system/lib/hw/lights.msm7k /system/lib/hw/lights.trout.so
adb shell reboot
FROM TERMINAL
cp /system/lib/hw/lights.msm7k /system/lib/hw/lights.trout.so
*since you can't reboot from terminal anymore, go ahead and power down your phone, then turn it back on.
Now you can go Messaging or whatever app, open your keyboard and the backlight works.
Click to expand...
Click to collapse
Just did it and it worked great. Thanks.
just as a quick reference or alternative:
CALL (green) + MENU + END (red)
to reboot. I find it a little bit faster than typing reboot in the emu when you get the muscle memory taken care of.
Click to expand...
Click to collapse
Does this work for everyone's Hero builds? Cause it doesn't on mine.
So last night I rooted my phone using an article from brief mobile. Can't post a link since I'm a new user so here's some copy paste:
Extract the ADB-Fastboot package and root image to your C:\ Drive under a new folder titled “root”
Put your device into Fastboot mode: – Turn off your device. – Hold down the power button and downward volume button until you see “Fastboot” on your screen – Push the upward volume button
Open your command prompt (Start >> run “cmd” >> enter)
Type the following commands
cd C:/root
fastboot flash preinstall root.img
fastboot reboot
Enable USB debugging (Settings >> Applications >> Debugging)
Type the following commands
adb shell
/preinstall/dosu
Type the following commands
/bin/mount /system -o remount,rw
cp /preinstall/su /system/bin/su
chmod 6755 /system/bin/su
PATH=/system/bin:$PATH pm install /preinstall/Superuser.apk
Congratulations! You are rooted!
Anyways everything worked out fine, the only hang up was an error that said "fastboot is not recognized as an internal or external command, operable program or batch file" after typing /preinstall/dosu. Anyways I tried it a few different times and then googled it and found another site that said just ignore the error. So I went on and finished the guide. Everything seemed successful, root was achieved. After rooting I removed a few bloat programs and went to bed for the night. Today I have had issues with the notification bar at the top crashing randomly, if I restart the phone the bar is there but eventually it just goes away. Also if the phone is asleep or I'm on any screen but the home screen when someone calls the phone rings but the thing that pops up that allows you to answer never comes up. I also do not get any text message alerts, the messages come through but I'm never alerted I have to open texts and see if I have any. So after all these issues I thought maybe I uninstalled something that was needed so I opened up Titanium Backup and re-installed all of the programs I uninstalled. Still no dice the problem persists. So I did a factory reset on the phone and still am having the same problem. Can anyone help me? Sorry if this was long winded, just trying to be descriptive.
Thanks
Any help out there?
Sent from my MB860 using XDA
Maybe you should try wipe data/factory reset?
Clear apps data-SystemUI,Settings,Notification bar etc.
miui-lover said:
Maybe you should try wipe data/factory reset?
Clear apps data-SystemUI,Settings,Notification bar etc.
Click to expand...
Click to collapse
Then you can move on over to here:
Neutrino
http://forum.xda-developers.com/show....php?t=1398819
Or any other ROM you might want to flash.
I'm interested in turning off Google auto updates. I have seen this info on Google, and wonder if someone with experience can advise/thumbs up/thumbs down regarding their use? Pros/cons?
I've input number 3, to turn off updates, but after entering su into the terminal, and then the command;, I receive: defaults: not found
https://support.google.com/installer/answer/147176?hl=en
Update Frequency
If this is a temporary change, make note of your current settings first by executing the following in the Terminal application:
$ defaults read com.google.Keystone.Agent checkInterval
To change how frequently Google Software Update checks for updates, execute the following in the Terminal application:
$ defaults write com.google.Keystone.Agent checkInterval <frequency>
where <frequency> is the elapsed time in seconds between update checks.
To disable Google Software Update from checking for updates, execute the following in the Terminal application:
$ defaults write com.google.Keystone.Agent checkInterval 0
To re-apply the current settings (after changing it to something else) execute the following in the Terminal application:
$ defaults write com.google.Keystone.Agent checkInterval <previous value>
where <previous value> is the value from the read command above.
Manual Updates
Google Software Update also provides a way to manually update all Google software on a user's Mac. Here's how:
In Finder, select Go > Go to Folder.
In the window that appears, enter one of the following locations. It's expected that one of these folders won't be found:
/Library/Google/GoogleSoftwareUpdate/GoogleSoftwareUpdate.bundle/Contents/Resources/
~/Library/Google/GoogleSoftwareUpdate/GoogleSoftwareUpdate.bundle/Contents/Resources/
In the folder that opens, double click the file named 'CheckForUpdatesNow.command'.
Terminal will open to run the file. When you see the message '[Process completed]' you can close Terminal. Once this is done, your Google programs will be up to date.
Thank you.
In this post, I will try to explain the devices I purchased, the mods I needed to do, and how they can be useful.
I wanted a touch panel on my wall to control my home automation system (Home Assistant). While most people just wall mount an old tablet, I did not like that idea due to a tablet being a battery powered device and not designed to be plugged into a wall charger 24/7.
So I started looking for alternatives, from China of course. In mid-2020 I purchased a couple of 'Android In-wall Amplifiers' from AliExpress. These devices mains voltage powered (110V-250V AC). They are designed to be mounted 'in-wall' and control multiple audio zones throughout rooms in your house. They also happen to have RS485 (which I am yet to explore).
I ordered 2 variants to test. Here are the specs:
'Rockchip 86F' - AliExpress Link
4-inch IPS Display, 480*480 Resolution
Android 7.1 System, 4 Core Processor, Cortex 1.2G CPU
RAM: 1GB
Storage: 8GB
Network: Support Wi-Fi
Bluetooth: Support
Power Supply Mode: AC 110-250VC
Output Power: 2*20W or 4*15W (simulation power amplifier)
Output Impedance: 4-8Ω
Audio Inputs; Output
'Rockchip A7' - AliExpress Link
7-inch IPS Display, 1024*600 Resolution
Android 8.1 System, 4 Core Processor, Cortex 1.5G CPU
RAM: 2GB
Storage: 16GB
USB 2.0 port, can read 32GB
Network: Support Wi-Fi 2.4GHz/5GHz
Bluetooth: Support BT 5.0
Power Supply Mode: AC 110-250VC
Output Power 8*20W (Yamaha digital amplifier)
Output Impedance: 4-8Ω
The Goal
My goal was to install Home Assistant companion app on these devices, and mount them in my walls to help control/monitor my smart home. The 'proper' way to go about this would be to install the Home Assistant companion app from the Play Store. While the 7-inch version was marketed as having the Play Store, the 4-inch was not.
The Problems
As it turned out, the Play Store app on the 7-inch version did not function. It simply crashed on launch, over and over again. The 4-inch version simply does not come with the Play Store at all. So I decided to sideload the Home Assistant companion app and try things that way. At the heart of it, the Home Assistant companion app simply shows a WebView. I was met with 2 main problems.
Non-functioning (or missing) Play Store
Missing SSL CA-Bundle certs (meaning I was getting SSL errors)
An outdated Android WebView (meaning I was getting rendering errors and glitches)
Please see the following posts (coming soon) for my journey into these devices, and how I solved the problems.
Let's start with the 7-inch version.
First, I tried to tackle the broken Play Store. Generally speaking, people will suggest downloading OpenGApps and using TWRP to flash them. Unfortunately because this device is some random no-name device from China, it would be nearly impossible to find a working TWRP recovery for it. So flashing OpenGApps via a custom recovery is out of the question. Thankfully, there are other ways.
Installing the Play Store
First we need to enable 'USB Debugging' which can be found in 'Developer options' part of the Settings app within Android.
Open 'Settings' app, scroll down and select 'System' and then 'About tablet'
Once there, look for 'Build Number' and quickly tape on it 10 times or so until you see 'You are now a developer'
Back out of that menu and you should now see a new 'Developer options' section.
Inside 'Developer options' there is a setting labelled 'USB debugging'. Enable it.
Connect your tablet to your PC using a micro-USB cable.
Now we need to use ADB to install a few APKs to the device. If you don't have ADB installed on your computer, now is a good time to do it. Search this forum for information on how to do so.
The following APKs are needed, and should be installed in this order:
com.google.android.gsf.login
com.google.android.gsf
com.google.android.gms
com.android.vending
Obtain those APKs from your favourite APK repository and install them using '
Code:
adb install <filename>
'. Once all 4 are installed, the Play Store should be working. If not, reboot for good measure. I will attach a list of the specific versions of the APKs I installed.
Now you can install the Home Assistant companion app (or another browser of your choice, such as Fully Kiosk) and away you go, right? Well, sort of.
Since this tablet comes with an old/outdated version of Android WebView you are likely to get rendering/display issues in both the HA app, and Fully Kiosk app. Both of these use the configured 'Android WebView' option found in 'Developer options'. Unfortunately, in this ROM, that value has been hardcoded to use 'com.android.webview' package, which is a system app and not updatable from the Play Store. The Play Store 'Android WebView' is actually 'com.google.android.webview' and is not in the list of allowed 'Android WebView' options for this device. So I had two options. Firstly, ask the device manufacturer to make an updated ROM that allows other WebView implementations, or, try and modify if myself.
Updating (Installing alternative) Android WebView
The first method I tried was to install a newer 'com.android.webview' into /system/ which ended in failure... The tablet didn't appreciate this, and got stuck on next boot. Do not try this.
The second method I tried was to modify /system/framework/framework-res.apk to include alternative WebView implementations. This also failed. Do not try this.
The third method I tried was installing Xposed Framework, so that I can modify the WebView options that way. This method usually requires a custom recovery such as TWRP, which we do not have. Here is what we have to do instead:
Download the xposed-v90-sdk27-arm.tar from here
Download the XposedInstaller_3.1.5.apk attached to this post.
Use adb on your PC to copy it to the device
Code:
adb push xposed-v90-sdk27-arm.tar /sdcard/Download/
Use adb on your PC to install the XposedInstaller apk
Code:
adb install XposedInstaller_3.1.5.apk
Open an adb shell
Code:
adb shell
and switch to root by typing
Code:
su
Remount the /system filesystem (may not be needed as the install script may do this)
Code:
mount -o rw,remount /system
Extract the xposed-v90-sdk27-arm.tar file
Code:
tar -xvf xposed-v90-sdk27-arm.tar
Change into the directory that was just created
Code:
cd xposed-v90-sdk27-arm
Make the installer script executable
Code:
chmod a+x flash-script.sh
and run it
Code:
./flash-script.sh
Xposed Framework is now installed, but not activated. Reboot your device. Please note, it will take longer to boot than usual on the first boot.
Once your device has rebooted, open the Xposed Installed app and make sure it is activated. If it's orange and says its not activated, another reboot should sort it.
Once you have confirmed it is activated, we need to install a module called 'Any WebView'. Click on the Hamburger Menu, tap 'Download' and use the search to look for an install 'Any WebView'. Reboot your device.
Now, we need to install an updated Android WebView. You can install any compatible webview such as 'Google Chrome' or 'Android WebView' from the Play Store.
Go back into Settings->Developer options, select 'WebView Implementation' and choose your newly installed WebView. Do not use 'Android System WebView 61.0.x' as it is outdated.
Congratulations! You can now install the HA app, Fully Kiosk app, or anything else you need from the Play Store.
Here are some images of my 7 inch device displayed the Home Assistant Lovelace UI in Fully Kiosk Browser.
On to the 4-inch version
This unit had similar problems (no Play Store and outdated WebView implementation) but it was a bit more of a mess to deal with.
Installing the Play Store
Unlike the 7-inch version, you cannot simply install the APKs and expect it to work. Google Play Services will repeatedly crash and logical shows this is due to a missing MANAGE_USERS permission.
Like the 7-inch version, there is no custom recovery available for this unit, so flashing something like OpenGApps in the normal fashion is not possible either. Unpacking the OpenGApps zip and attempting to run the installer script within is also a dead-end as it requires the 'ash' shell that is not available on the device. But never fear, I got things to work.. here is how:
First we need to enable 'USB Debugging' which can be found in 'Developer options' part of the Settings app within Android.
Open 'Settings' app, by swiping down from the top of the screen and long-pressing the Wi-Fi icon.
This will load the settings app on the Wi-Fi page
Press the 'hamburger menu' and scroll down and select 'About device'
Once there, look for 'Build Number' and quickly tape on it 10 times or so until you see 'You are now a developer'
Click on the 'hamburger menu' again and you should now see a new 'Developer options' section.
Inside 'Developer options' there is a setting labelled 'USB debugging'. Enable it.
Connect your tablet to your PC using a micro-USB cable.
This is where things get a bit different. I had to unpack the OpenGApps zip file, unpack the lzip archives inside that, and figure out where all the files are meant to go so we can manually graft them into the /system/ folder on the device. You can download the ready-to-go folder here.
If you're the kind of person who wants to do it themselves, I have attached a directory tree structure to this post that shows where the files need to be.
As with the 7" version, we are going to use ADB to get these files onto the unit.
Copy the files onto the device
Code:
adb push opengapps-4inch.tar /sdcard/Download/
Open an adb shell
Code:
adb shell
and switch to root by typing
Code:
su
Remount the /system filesystem
Code:
mount -o rw,remount /system
Unpack the opengapps-4inch.tar file
Code:
cd /
tar -xvf /sdcard/Download/opengapps-4inch.tar
That should be it. Reboot and check that the Play Store is now available on your device.
Updating (Installing alternative) Android WebView
Just like the 7-inch version above, we do basically the same thing, but we have to use a different version of the Xposed Framework suitable for Android 7.1.2
Download the xposed-v89-sdk25-arm.tar from here
Download the XposedInstaller_3.1.5.apk attached to the first post. We can use the same version of this app.
Use adb on your PC to copy it to the device
Code:
adb push xposed-v89-sdk25-arm.tar /sdcard/Download/
Use adb on your PC to install the XposedInstaller apk
Code:
adb install XposedInstaller_3.1.5.apk
Open an adb shell
Code:
adb shell
and switch to root by typing
Code:
su
Remount the /system filesystem (needed if you rebooted after installing Play Store)
Code:
mount -o rw,remount /system
Extract the xposed-v89-sdk25-arm.tar file
Code:
tar -xvf xposed-v89-sdk25-arm.tar
Change into the directory that was just created
Code:
cd xposed-v89-sdk25-arm
Make the installer script executable
Code:
chmod a+x flash-script.sh
and run it
Code:
./flash-script.sh
Xposed Framework is now installed, but not activated. Reboot your device. Please note, it will take longer to boot than usual on the first boot.
Once your device has rebooted, open the Xposed Installed app and make sure it is activated. If it's orange and says its not activated, another reboot should sort it.
Once you have confirmed it is activated, we need to install a module called 'Any WebView'. Click on the Hamburger Menu, tap 'Download' and use the search to look for an install 'Any WebView'. Reboot your device.
Now, we need to install an updated Android WebView. You can install any compatible webview such as 'Google Chrome' or 'Android WebView' from the Play Store.
Go back into Settings->Developer options, select 'WebView Implementation' and choose your newly installed WebView. Do not use 'Android System WebView 61.0.x' as it is outdated.
Congratulations! You can now install the HA app, Fully Kiosk app, or anything else you need from the Play Store.
Nice DIY project!
Google Assistant (including "Hey Google" activation) on the 4-inch device
So I managed to get Google Assistant installed and working on the 4-inch version (The 7-inch does not have a microphone built in).
You need both the "Google" app and the "Google Assistant" app, and both are available in the Play Store, but "Hey Google" voice activation will not work unless the "Google" app is installed as a system app.
Getting "Google" app installed as a system app
1) Download and install "Google" from the Play Store as you would any other app.
2) Use adb to connect to the device
Code:
adb shell
3) Switch to root user
Code:
su
4) Remount the system partition as read/write
Code:
mount -o rw,remount /system
5) Navigate to the user apps directory
Code:
cd /data/app/
6) Copy the "Google" app into system apps folder
Code:
cp -R com.google.android.googlequicksearchbox-1 /system/priv-app/
7) At this point, you should be able to delete the 'user app' copy and reboot.
Code:
rm -rf /data/app/com.google.android.googlequicksearchbox-1
reboot
8) Once the device has restarted, go to the Play Store and install "Google Assistant".
You should now be able to configure your Google Assistant to respond to "Hey Google" and "Ok Google" voice activations.