[ROM+KERNEL+TWRP][Ticwatch Pro(Catfish)(Catshark-4G)]+[Ticwatch C2(Skipjack)[9Aug20]

Search This thread

robertobiundo

Member
Aug 14, 2019
17
37
Performance Tips

Final Update
Janjan has already included in the new rom all of these changes. So no need to keep reading this post.

I'll leave it here in case it helps someone with other type for smartwatch.

Great job @janjan keep it going.

------------------- Original Post -------------------------
Here are my two cents on performance on this device.

The Problem
Like in many android devices one of the main issues ( i learned this with old phones ) is the RAM and Swap.
While switching apps or opening new ones the following events happen (please remember this is a linux based OS so all of this assumptions are based on Linux experience)

1. App open request happens
2. Os checks if app is running if it is is switches to it
2.a If app is in RAM it loads it from there
2.b if its not it loads it from the swap to the RAM and then loads it from there (less expensive than reopening the app)
3. If app is not running it start it (running all the initialization procedures that can be very expensive in some apps) and gets the app to RAM

Now, if at any point of that process the RAM is full, the OS will dump another app to Swap. If the swap is full the OS will dump another (least used app) completely out of the system stopping it and therefore having to reopen it entirely later on (expensive process).

Ok. Now that this is clear lets see the Ticwatch.
The available RAM is less than 512Mb. After the system boots and all the Google services, google play, keyboard services, assistant, etc are loaded we end up with less than 100Mb available. Enough to open two apps. One of them being the launcher, "wearable.app". After this the thing start swapping. Right?.....Wrong!!!

See, there is no swap on the device. therefore opening any app will force another one out of the system completely stopping it and having to restart it later on (EXPENSIVE for CPU and Battery). This includes the wearable app. Your watchface.
One of the apps really capable of doing this is Google Play since it just LOVES RAM. It will kick everythinbg out of RAM pretty much, including your watchface. And since it runs background processes (like app updating) the OS will find hard to kick Google Play out of RAM as well.

I will not post more examples and reasons why Swap is important. But I will post the solution

The solution
USE AT YOUR OWN RISK
Creating a swap file will allow us to extend the maximum amount of available RAM. We are aware that RAM disk is slow, and should be avoided at all cost, but in this case it is quite beneficial. Here is how to enable it

1. Have the custom ROM installed
2. Have the latest kernel installed
3. Have developer options enabled
4. Have busybox and magisk installed

Run the following commands on your computer
adb devices (device should show up there if properly connected)
adb shell
su (approve access on device itself)
fallocate -l 256M /sbin/.magisk/mirror/data/swapfile
mkswap /sbin/.magisk/mirror/data/swapfile
swapon /sbin/.magisk/mirror/data/swapfile
sysctl vm.swappiness=60

Now, some notes
1. The 256Mb is a (so far) arbitrary number I came up with. Over monitoring it closely it seems that 256Mb is enough. Change this to your liking. You can check the amount of used swap by running the command top while in adb shell
2. The selected swappinesss is the default for a desktop computer, it may require tweaking but so far seems ok.
3. Updating apps with the play store still uses a LOT of CPU, but is way more responsive now and I would recommend updating apps only when you are not going to need the watch or while charging.
4. Use this alongside kernel auditor and ondemand governor with 4 cores enabled and 1.2Ghz as max cpu frequency.
5. After reboot swap will be lost and you will have to set it up again. Please note that I did it this way since i'm still testing this.
6. Your device may have a reduces SD life and could be detrimental if the manufacturer used a low grade chip

The Result
Well. Apps NEVER get relaunched.
1. They never get stopped in the first place in order to make space for other apps
2. They switch WAY faster since they are either in RAM or in SWAP
3. First launch of any app is faster since other apps don't need to be stopped first
4. Finally the TicWatch Pro is a useful device. I no longer think that getting a Google Authenticator code will be faster if i just use my phone.

I hope this helps you all.
I'm available to answer your questions on European (i'm awake) times.

---------- Post added at 06:57 PM ---------- Previous post was at 06:27 PM ----------

I recorded a video to show the snappiness of the device now.
Note about the video. Some apps where previously opened (therefore where on RAM or the new shinny SWAP)
other apps like the flashlight, weather and Magisk, where not. but you can see that after opening them they reopen (switch back) pretty much instantly.
During the video the Swap usage was 140Mb.

Link to video - Please remove spaces since XDA does not allow me to post links XD:
https ://youtu.be/UVk4JLqC8Do

One of the main things I realized is that after launching the google assistant (hold main button 1 sec) I can actually relaunch it 100 times after that (including app witching) and still get my response to (turn on the lights in the house, or how is the weather in less than 1 sec)

This is a must try :)

------------------------------------------------------ Update 1 -----------------------------------------------------------

After testing, using swap seems to affect battery usage on a rate of about 10% drain (depends on your usage).
The main reason could be the fact that now we are using the storage a lot more, and using the storage means that this chip will consume more power.
my watch have been running now for 2 days (with 1 battery charge in between) and I had not performance issues. I was able to work with notifications, receive phone calls, use the assistant, google fit, etc.

------------------------------------------------------ Update 2 -----------------------------------------------------------
I realized that after having every app running and not having to boot them again the device battery is actually well improved. I'm doing 36-48h now.
Also realized that finally the Google assistant is useful. Responsive and helpful
I reduced the amount of cache to 256Mb and updated the script. Seems to be enough for a custom watchface Google fit, assistant, calendar, weather, hr monitor and Google play to run at the same time.
Do not try (as I did), to run 1Gb of swap. You will never get to use it and since you need to allocate all the space at once you cannot install more apps. The device will become unresponsive and and connection fails at this point for a reason. Causing weird connection and disconnections

------------------------------------------------------ Update 3 -----------------------------------------------------------
How to make it persistent after reboot
Here is small script in oder to make the swap permanent
I did not find a way to use the fstab or the init.rc since none of them seem to be available in Android
It seems that is available in some devices but not on other. But, since we also need Magisk for the actual swap we can also use it to run the script using the handy service.d folder

Script (save to a remount_swap.sh file in your pc, you can do this with a text editor, just make sure that you don't accidentally have a .txt at the end)
#!/system/bin/sh
sleep 10
sysctl vm.swappiness=60
swapon /sbin/.magisk/mirror/data/swapfile

How to copy the script
adb push <path_to_your_script>\remount_swap.sh /storage/emulated/0/
adb shell
su
cd /storage/emulated/0/
mv remount_swap.sh /sbin/.magisk/img/.core/service.d/
cd /sbin/.magisk/img/.core/service.d/
chmod +x remount_swap.sh
adb reboot
 
Last edited:

chhc007

Member
Nov 25, 2017
20
0
Is it possible for me to use Google Play Store in the Chinese version?
I tried to delete a xml file and prebuiltwearskyheadless and put the new prebuiltwearsky into system,but when i try to pair to my phone it shows connected on the watch and jump back to the language select page!
I even tried to modify the rom but i failed.
Can anyone help me please.
I am on Chinese version now, i just want to use google play store because there are too less apps on chinese app store!
 

kitchenfork

Senior Member
Sep 7, 2011
202
52
Here are my two cents on performance on this device.

The Problem
Like in many android devices one of the main issues ( i learned this with old phones ) is the RAM and Swap.
While switching apps or opening new ones the following events happen (please remember this is a linux based OS so all of this assumptions are based on Linux experience)

1. App open request happens
2. Os checks if app is running if it is is switches to it
2.a If app is in RAM it loads it from there
2.b if its not it loads it from the swap to the RAM and then loads it from there (less expensive than reopening the app)
3. If app is not running it start it (running all the initialization procedures that can be very expensive in some apps) and gets the app to RAM

Now, if at any point of that process the RAM is full, the OS will dump another app to Swap. If the swap is full the OS will dump another (least used app) completely out of the system stopping it and therefore having to reopen it entirely later on (expensive process).

Ok. Now that this is clear lets see the Ticwatch.
The available RAM is less than 512Mb. After the system boots and all the Google services, google play, keyboard services, assistant, etc are loaded we end up with less than 100Mb available. Enough to open two apps. One of them being the launcher, "wearable.app". After this the thing start swapping. Right?.....Wrong!!!

See, there is no swap on the device. therefore opening any app will force another one out of the system completely stopping it and having to restart it later on (EXPENSIVE for CPU and Battery). This includes the wearable app. Your watchface.
One of the apps really capable of doing this is Google Play since it just LOVES RAM. It will kick everythinbg out of RAM pretty much, including your watchface. And since it runs background processes (like app updating) the OS will find hard to kick Google Play out of RAM as well.

I will not post more examples and reasons why Swap is important. But I will post the solution

The solution
USE AT YOUR OWN RISK
Creating a swap file will allow us to extend the maximum amount of available RAM. We are aware that RAM disk is slow, and should be avoided at all cost, but in this case it is quite beneficial. Here is how to enable it

1. Have the custom ROM installed
2. Have the latest kernel installed
3. Have developer options enabled
4. Have busybox and magisk installed

Run the following commands on your computer
adb devices (device should show up there if properly connected)
adb shell
su (approve access on device itself)
fallocate -l 512Mb /sbin/.magisk/mirror/data/swapfile
mkswap /sbin/.magisk/mirror/data/swapfile
swapon /sbin/.magisk/mirror/data/swapfile
sysctl vm.swappiness=60

Now, some notes
1. The 512Mb is a (so far) arbitrary number I came up with. Over monitoring it closely it seems that 256Mb is enough. Change this to your liking. You can check the amount of used swap by running the command top while in adb shell
2. The selected swappinesss is the default for a desktop computer, it may require tweaking but so far seems ok.
3. Updating apps with the play store still uses a LOT of CPU, but is way more responsive now and I would recommend updating apps only when you are not going to need the watch or while charging.
4. Use this alongside kernel auditor and ondemand governor with 4 cores enabled and 1.2Ghz as max cpu frequency.
5. After reboot swap will be lost and you will have to set it up again. Please note that I did it this way since i'm still testing this.
6. Your device may have a reduces SD life and could be detrimental if the manufacturer used a low grade chip

The Result
Well. Apps NEVER get relaunched.
1. They never get stopped in the first place in order to make space for other apps
2. They switch WAY faster since they are either in RAM or in SWAP
3. First launch of any app is faster since other apps don't need to be stopped first
4. Finally the TicWatch Pro is a useful device. I no longer think that getting a Google Authenticator code will be faster if i just use my phone.

I hope this helps you all.
I'm available to answer your questions on European (i'm awake) times.

---------- Post added at 06:57 PM ---------- Previous post was at 06:27 PM ----------

I recorded a video to show the snappiness of the device now.
Note about the video. Some apps where previously opened (therefore where on RAM or the new shinny SWAP)
other apps like the flashlight, weather and Magisk, where not. but you can see that after opening them they reopen (switch back) pretty much instantly.
During the video the Swap usage was 140Mb.

Link to video - Please remove spaces since XDA does not allow me to post links XD:
https ://youtu.be/UVk4JLqC8Do

One of the main things I realized is that after launching the google assistant (hold main button 1 sec) I can actually relaunch it 100 times after that (including app witching) and still get my response to (turn on the lights in the house, or how is the weather in less than 1 sec)

This is a must try :)

I would give this a try, however, installing magisk 19.3 and busybox makes my watch unusable (it boots and shows the time but settings, apps etc. won't work). What version of magisk/busybox are you using?
 

robertobiundo

Member
Aug 14, 2019
17
37
How to enable all core running on April build?
I have try flash boot and vendor image in the extra folder (8/1 zip extract)
but I got a bootloop.

The boot and vendor in the extras folder is for the July build of Pie. Install that first and then the boot on the extras. This will give you all the cores

---------- Post added at 07:37 AM ---------- Previous post was at 07:19 AM ----------

I would give this a try, however, installing magisk 19.3 and busybox makes my watch unusable (it boots and shows the time but settings, apps etc. won't work). What version of magisk/busybox are you using?

I'm using
- Magisk 19.3 Stable
- Busybox_for_Android_NDK-1.29.2

I don't think they are the source of your issues. But they certainly use more RAM resources (Magisk around 5Mb of RAM i think). This could lead to unresponsiveness and weird behaviour. Or it may be just a coincidence with the normal really weird behaviors of WearOs when is struggling for RAM or CPU.

Try to install them on the latest PIE Build and trry adding the swap. I was having the same crashes and unresponsiveness as you until I added the swap. Since there is no more RAM the apps just crash including the main menu and the settings app.
They go into a weird deadlock where they both try to stay in RAM by restarting themselves (generally the wearable app, the play services and the play store). And since all of them want to be in RAM they keep kicking each other out in an infinite loop. More or less like this
1. User presses the home button
2. Wearable app needs ram to render icons
3. Google play get kicked out of ram
4. Google play restarts itself (since it needs to be always running apparently) and kicks a part of Google Services out.
5. Google Services restarts itself and kicks wearable app out.
6. The wearable app was asked to show the menu. Therefore we loop back to point 2.

And then you are stuck there forever. introducing swap solves the issue since the apps can run at the same time (slower, maybe, since they have to be swapped and unsnapped continuously), but they don't restart themselves forcing the immediate restart of others.

Anyway try it out.
And yes, with the Aug Version installed, magisk and busybox the watch becomes impossible to use. Totally impossible. Until you add swap. It would be nice to figure out the swap on the stock build, as well as the RAM usage. I believe they have some optimizations for this as well.
 
  • Like
Reactions: kitchenfork

robertobiundo

Member
Aug 14, 2019
17
37
Two cents? Looks like you've thrown your whole wallet into that post!
Thank you very much for doing so though, a highly informative post.

Haha, yeah, i started writing a small post originally but at some point i was like... OK I need to explain this, oh! people may need to know that. And here we are haha
Thank you, hope you try it and put it to good use.
 

Khu126

Member
Aug 13, 2019
6
1
ROM for Catshark

can anyone please share the english ROM for catshark (tiwatch pr 4g/lte), i am unable to use my watch plzzzzzzzzzzzzzzzzzz
 
Last edited:

ArisLi

Member
Nov 28, 2014
47
8
Taipei
I have gone back to April build with all core kernel.
I'm getting 2 day battery and very smooth experience.
The download link for all core enable boot/vendor image seem to be fail, and try the 8/1 all core boot/vendor on April build got boot loop, I don't find any file in extra folder for April build, so how can we enable all core on April build?
 

careloads

Senior Member
Jun 9, 2017
205
43
OnePlus 5T
Moto Z4
Swap fails

Here are my two cents on performance on this device.

The Problem


1. Have the custom ROM installed
2. Have the latest kernel installed
3. Have developer options enabled
4. Have busybox and magisk installed

Run the following commands on your computer
adb devices (device should show up there if properly connected)
adb shell
su (approve access on device itself)
fallocate -l 512Mb /sbin/.magisk/mirror/data/swapfile
mkswap /sbin/.magisk/mirror/data/swapfile
swapon /sbin/.magisk/mirror/data/swapfile
sysctl vm.swappiness=60

Now, some notes
1. The 512Mb is a (so far) arbitrary number I came up with. Over monitoring it closely it seems that 256Mb is enough. Change this to your liking. You can check the amount of used swap by running the command top while in adb shell
2. The selected swappinesss is the default for a desktop computer, it may require tweaking but so far seems ok.
3. Updating apps with the play store still uses a LOT of CPU, but is way more responsive now and I would recommend updating apps only when you are not going to need the watch or while charging.
4. Use this alongside kernel auditor and ondemand governor with 4 cores enabled and 1.2Ghz as max cpu frequency.
5. After reboot swap will be lost and you will have to set it up again. Please note that I did it this way since i'm still testing this.
6. Your device may have a reduces SD life and could be detrimental if the manufacturer used a low grade chip

I hope this helps you all.
I'm available to answer your questions on European (i'm awake) times.

---------- Post added at 06:57 PM ---------- Previous post was at 06:27 PM ----------

This is a must try :)

------------------------------------------------------ Update 1 -----------------------------------------------------------

After testing, using swap seems to affect battery usage on a rate of about 10% drain (depends on your usage).
The main reason could be the fact that now we are using the storage a lot more, and using the storage means that this chip will consume more power.
my watch have been running now for 2 days (with 1 battery charge in between) and I had not performance issues. I was able to work with notifications, receive phone calls, use the assistant, google fit, etc.

Running the commands is not working for me:


C:\ADB android>adb devices
List of devices attached
72EX91151515 device


C:\ADB android>adb shell
catfish:/ $ su
catfish:/ # fallocate -l 512Mb /sbin/.magisk/mirror/data/swapfile
fallocate: not integer: 512Mb
1|catfish:/ # mkswap /sbin/.magisk/mirror/data/swapfile
mkswap: /sbin/.magisk/mirror/data/swapfile: No such file or directory
1|catfish:/ # swapon /sbin/.magisk/mirror/data/swapfile
swapon: Couldn't swapon '/sbin/.magisk/mirror/data/swapfile': No such file or di
rectory
1|catfish:/ #

Looks like the file allocation fails, I tried smaller allocation, 256, 128 failed as well.
Any Ideas?
 

robertobiundo

Member
Aug 14, 2019
17
37
How to enable all core running on April build?
I have try flash boot and vendor image in the extra folder (8/1 zip extract)
but I got a bootloop.

Running the commands is not working for me:


C:\ADB android>adb devices
List of devices attached
72EX91151515 device


C:\ADB android>adb shell
catfish:/ $ su
catfish:/ # fallocate -l 512Mb /sbin/.magisk/mirror/data/swapfile
fallocate: not integer: 512Mb
1|catfish:/ # mkswap /sbin/.magisk/mirror/data/swapfile
mkswap: /sbin/.magisk/mirror/data/swapfile: No such file or directory
1|catfish:/ # swapon /sbin/.magisk/mirror/data/swapfile
swapon: Couldn't swapon '/sbin/.magisk/mirror/data/swapfile': No such file or di
rectory
1|catfish:/ #

Looks like the file allocation fails, I tried smaller allocation, 256, 128 failed as well.
Any Ideas?
Sorry, there should not be an Mb in the command. Only an M. I updated the original post as well. You can also try 1G.
Thanks for the input.
 
  • Like
Reactions: careloads

kitchenfork

Senior Member
Sep 7, 2011
202
52
I'm using
- Magisk 19.3 Stable
- Busybox_for_Android_NDK-1.29.2

I don't think they are the source of your issues. But they certainly use more RAM resources (Magisk around 5Mb of RAM i think). This could lead to unresponsiveness and weird behaviour. Or it may be just a coincidence with the normal really weird behaviors of WearOs when is struggling for RAM or CPU.

Try to install them on the latest PIE Build and trry adding the swap. I was having the same crashes and unresponsiveness as you until I added the swap. Since there is no more RAM the apps just crash including the main menu and the settings app.
They go into a weird deadlock where they both try to stay in RAM by restarting themselves (generally the wearable app, the play services and the play store). And since all of them want to be in RAM they keep kicking each other out in an infinite loop. More or less like this
1. User presses the home button
2. Wearable app needs ram to render icons
3. Google play get kicked out of ram
4. Google play restarts itself (since it needs to be always running apparently) and kicks a part of Google Services out.
5. Google Services restarts itself and kicks wearable app out.
6. The wearable app was asked to show the menu. Therefore we loop back to point 2.

And then you are stuck there forever. introducing swap solves the issue since the apps can run at the same time (slower, maybe, since they have to be swapped and unsnapped continuously), but they don't restart themselves forcing the immediate restart of others.

Anyway try it out.
And yes, with the Aug Version installed, magisk and busybox the watch becomes impossible to use. Totally impossible. Until you add swap. It would be nice to figure out the swap on the stock build, as well as the RAM usage. I believe they have some optimizations for this as well.

Wow, I think you are 100% spot on with what is happening and describes exactly what I went through for the best part of day down to a T!

Unfortunately I think I have given up on this watch and wear os. If it wasn't for JanJan and people like you doing great work I would have given up on this watch months ago. However I think I am now at the point where I don't have time for this craziness just to get the watch functioning to what I think a $300 AUD watch should be. I will switch over to Fitbit Versa 2 or galaxy watch active 2 in the coming months. I will miss the LCD screen though.

Thanks!

Edit: ha ha, and straight after saying that JanJan entices me with another ROM!
 
Last edited:

paolocorpo

Senior Member
Jan 9, 2013
1,787
380
Sassoferrato
[ROM+KERNEL+TWRP][Ticwatch Pro(Catfish)(Catshark 4G)]+[Ticwatch C2(Skipjack)[30-July]

Hello there..

I am going to upload another ROM+kernel+vendor. The ROM works fine for me. I mean it runs smoothly vs old ROM..No issue with RAM etc. So please test it out and let me know. Change log flashing steps will come later.



Fine !!
Very important gift for middle summer Day
We are all tuned


Inviato dal mio iPhone utilizzando Tapatalk
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Thank you very much. You saved my ticwatch from a brick.
  • 84
    -[Ticwatch Pro 4G/LTE (EU) (Catshark)-PWDD.190617.059]-[30-5-2020]
    - [Ticwatch Pro 2020 (Catfish-Ext)-PMP2.191203.001]-[22-6-2020]
    - [Ticwatch Pro (Catfish)-PWDD.190617.074]-[09-8-2020]
    #############################
    - [Ticwatch Pro 4G/LTE (USA) (Catshark)-PWDD.190617.032]-[DISCONTINUED]-
    -[Ticwatch C2 (Skipjack)-PWDS.190618.001.B4]-[DISCONTINUED]
    -[Ticwatch E2 (Tunny)-PWDS.190618.001.B3]-[DISCONTINUED]
    #############################



    Code:
    ****Disclaimer****
    [COLOR="Red"][B]WARNING:  IMPROPER FLASHING MAY POTENTIALLY BRICK YOUR DEVICE. SO PLEASE PROCEED AT YOUR OWN RISK. ME OR ANY OTHER DEVELOPER MENTIONED IN THIS POST WILL ASSUME NO RESPONSIBILITY FOR THIS. I accepts no responsibility for any damage to your device. Please read the instructions and notes before flashing anything[/B][/COLOR]

    IF YOU LIKE MY WORK AND WANT TO BUY ME A COFFEE
    DONATE-ME-HERE

    ###################
    REQUIREMENTS
    ###################

    - Ticwatch Pro, Ticwatch Pro 4G, Ticwatch Pro 2020 Ticwatch C2 and Ticwatch E2 ONLY INTERNATIONAL VERSION. It may also work on Chinese version too but I haven't test it personally.
    - An unlock bootloader, working driver and working adb/fastboot
    - You can download ADB/FASTBOOT from here Download: ADB/FASTBOOT
    - Custom recovery TWRP- (Se download section below)

    ###################
    HOW TO FLASH- STEPS
    ###################

    (FOLLOW EITHER THE INSTRUCTIONS FROM MEGA FOLDER OR THE STEPS BELOW)

    - Download the latest ROM, latest vendor, latest Magisk and busybox - (Everything are include in the MEGA folder)
    - Attach your watch to your PC and enable USB Debugging from settings menu. Ensure adb/fastboot is working. Please Google and see "how to enable debugging from settings menu".
    - Extract the vendor folder and go inside the folder (Here you will find vendor.img and twrp.img + other files)
    (You have to flash the vendor image and format userdata and cache)
    - Boot your watch into fastboot/bootloader mode by applying the following code.
    Code:
    - adb devices
    - adb reboot bootloader
    - fastboot flash vendor vendor.img
    - fastboot format userdata OR fastboot erase userdata
    - fastboot format cache OR fastboot erase cache
    - fastboot boot NAME-OF-THE-TWRP.img (Se the name of the twrp.img)

    - Now move the ROM, Magisk and busybox to your watch.
    - Flash the ROM and reboot. If you prefer root then
    - Flash busybox and finally Magisk (IMPORTANT flash ROM, then Busybox and Magisk in this order)

    NOTE
    - When rebooting your watch, IF a Prompt come up and asking about installing twrp bla.bla then un-mark both lines/ then click on DO Not Install
    - Let your device boot up, then connect your watch to your phone and finish the initial setting
    - Open Magisk Manager and go to settings and set Automatic Response to Grant, Uncheck updates and Superuser notifications to None
    - Reboot and enjoy

    ###################
    ROM AND KERNEL FEATURES-
    See latest changelog here
    ###################

    DOWNLOAD
    [DECRYPTION KEY]
    Code:
    iZbWXMs8vabDW1szJz1hgg

    OPTIONAL
    TO INSTALL KERNEL CONTROL APP WEAR OS

    Code:
    - Download the KernelAudiutor4Wear.apk from above link and move it to your adb folder.
    - adb devices
    - adb install KernelAudiutor4Wear.apk

    MAGISK/BUSYBOX/APP-KERNEL-CONTROL
    DOWNLOAD LATEST MAGISK FROM HERE
    DOWNLOAD LATEST BUSYBOX FROM HERE
    KERNEL CONTROL APP WEAR OS

    ###################
    BACK TO STOCK ROM
    See Mega folder for Stock images
    Code:
    [[B]DECRYPTION KEY[/B]]
    iZbWXMs8vabDW1szJz1hgg
    [B][SIZE="4"]STEPS[/SIZE][/B]
    - fastboot flash aboot aboot.img
    - fastboot flash boot boot.img
    - fastboot flash recovery recovery.img
    - fastboot flash vendor vendor.img
    - fastboot flash system system.img
    - fastboot format userdata OR fastboot erase userdata
    - fastboot format cache OR fastboot erase cache
    - fastboot reboot
    ##############################
    Source/GitHub
    ##############################

    -Source
    -Source
    -Source

    ###################
    IF YOU LIKE MY WORK AND WANT TO BUY ME A COFFEE
    DONATE-ME-HERE
    ###################

    Special thanks to:
    If you can, donate and respect all the devs and enjoy :)
    @Maxr1998 Big thanks for giving me knowledge and your great work for Asus Zenwatch_3 and your great github guide.
    @topjohnwu for his great effort (Magisk)Thank you so much
    @SuperR.R for the great kitchen
    @YashdSaraf for the busybox (I edit a bit to make it work for Ticwatch-pro)
    Sultan Al Sawaf for his patch
    Mobvoi, Google and Qualcomm for providing us the kernel source.
    Please always support devs and others (soon).
    21
    Performance Tips

    Final Update
    Janjan has already included in the new rom all of these changes. So no need to keep reading this post.

    I'll leave it here in case it helps someone with other type for smartwatch.

    Great job @janjan keep it going.

    ------------------- Original Post -------------------------
    Here are my two cents on performance on this device.

    The Problem
    Like in many android devices one of the main issues ( i learned this with old phones ) is the RAM and Swap.
    While switching apps or opening new ones the following events happen (please remember this is a linux based OS so all of this assumptions are based on Linux experience)

    1. App open request happens
    2. Os checks if app is running if it is is switches to it
    2.a If app is in RAM it loads it from there
    2.b if its not it loads it from the swap to the RAM and then loads it from there (less expensive than reopening the app)
    3. If app is not running it start it (running all the initialization procedures that can be very expensive in some apps) and gets the app to RAM

    Now, if at any point of that process the RAM is full, the OS will dump another app to Swap. If the swap is full the OS will dump another (least used app) completely out of the system stopping it and therefore having to reopen it entirely later on (expensive process).

    Ok. Now that this is clear lets see the Ticwatch.
    The available RAM is less than 512Mb. After the system boots and all the Google services, google play, keyboard services, assistant, etc are loaded we end up with less than 100Mb available. Enough to open two apps. One of them being the launcher, "wearable.app". After this the thing start swapping. Right?.....Wrong!!!

    See, there is no swap on the device. therefore opening any app will force another one out of the system completely stopping it and having to restart it later on (EXPENSIVE for CPU and Battery). This includes the wearable app. Your watchface.
    One of the apps really capable of doing this is Google Play since it just LOVES RAM. It will kick everythinbg out of RAM pretty much, including your watchface. And since it runs background processes (like app updating) the OS will find hard to kick Google Play out of RAM as well.

    I will not post more examples and reasons why Swap is important. But I will post the solution

    The solution
    USE AT YOUR OWN RISK
    Creating a swap file will allow us to extend the maximum amount of available RAM. We are aware that RAM disk is slow, and should be avoided at all cost, but in this case it is quite beneficial. Here is how to enable it

    1. Have the custom ROM installed
    2. Have the latest kernel installed
    3. Have developer options enabled
    4. Have busybox and magisk installed

    Run the following commands on your computer
    adb devices (device should show up there if properly connected)
    adb shell
    su (approve access on device itself)
    fallocate -l 256M /sbin/.magisk/mirror/data/swapfile
    mkswap /sbin/.magisk/mirror/data/swapfile
    swapon /sbin/.magisk/mirror/data/swapfile
    sysctl vm.swappiness=60

    Now, some notes
    1. The 256Mb is a (so far) arbitrary number I came up with. Over monitoring it closely it seems that 256Mb is enough. Change this to your liking. You can check the amount of used swap by running the command top while in adb shell
    2. The selected swappinesss is the default for a desktop computer, it may require tweaking but so far seems ok.
    3. Updating apps with the play store still uses a LOT of CPU, but is way more responsive now and I would recommend updating apps only when you are not going to need the watch or while charging.
    4. Use this alongside kernel auditor and ondemand governor with 4 cores enabled and 1.2Ghz as max cpu frequency.
    5. After reboot swap will be lost and you will have to set it up again. Please note that I did it this way since i'm still testing this.
    6. Your device may have a reduces SD life and could be detrimental if the manufacturer used a low grade chip

    The Result
    Well. Apps NEVER get relaunched.
    1. They never get stopped in the first place in order to make space for other apps
    2. They switch WAY faster since they are either in RAM or in SWAP
    3. First launch of any app is faster since other apps don't need to be stopped first
    4. Finally the TicWatch Pro is a useful device. I no longer think that getting a Google Authenticator code will be faster if i just use my phone.

    I hope this helps you all.
    I'm available to answer your questions on European (i'm awake) times.

    ---------- Post added at 06:57 PM ---------- Previous post was at 06:27 PM ----------

    I recorded a video to show the snappiness of the device now.
    Note about the video. Some apps where previously opened (therefore where on RAM or the new shinny SWAP)
    other apps like the flashlight, weather and Magisk, where not. but you can see that after opening them they reopen (switch back) pretty much instantly.
    During the video the Swap usage was 140Mb.

    Link to video - Please remove spaces since XDA does not allow me to post links XD:
    https ://youtu.be/UVk4JLqC8Do

    One of the main things I realized is that after launching the google assistant (hold main button 1 sec) I can actually relaunch it 100 times after that (including app witching) and still get my response to (turn on the lights in the house, or how is the weather in less than 1 sec)

    This is a must try :)

    ------------------------------------------------------ Update 1 -----------------------------------------------------------

    After testing, using swap seems to affect battery usage on a rate of about 10% drain (depends on your usage).
    The main reason could be the fact that now we are using the storage a lot more, and using the storage means that this chip will consume more power.
    my watch have been running now for 2 days (with 1 battery charge in between) and I had not performance issues. I was able to work with notifications, receive phone calls, use the assistant, google fit, etc.

    ------------------------------------------------------ Update 2 -----------------------------------------------------------
    I realized that after having every app running and not having to boot them again the device battery is actually well improved. I'm doing 36-48h now.
    Also realized that finally the Google assistant is useful. Responsive and helpful
    I reduced the amount of cache to 256Mb and updated the script. Seems to be enough for a custom watchface Google fit, assistant, calendar, weather, hr monitor and Google play to run at the same time.
    Do not try (as I did), to run 1Gb of swap. You will never get to use it and since you need to allocate all the space at once you cannot install more apps. The device will become unresponsive and and connection fails at this point for a reason. Causing weird connection and disconnections

    ------------------------------------------------------ Update 3 -----------------------------------------------------------
    How to make it persistent after reboot
    Here is small script in oder to make the swap permanent
    I did not find a way to use the fstab or the init.rc since none of them seem to be available in Android
    It seems that is available in some devices but not on other. But, since we also need Magisk for the actual swap we can also use it to run the script using the handy service.d folder

    Script (save to a remount_swap.sh file in your pc, you can do this with a text editor, just make sure that you don't accidentally have a .txt at the end)
    #!/system/bin/sh
    sleep 10
    sysctl vm.swappiness=60
    swapon /sbin/.magisk/mirror/data/swapfile

    How to copy the script
    adb push <path_to_your_script>\remount_swap.sh /storage/emulated/0/
    adb shell
    su
    cd /storage/emulated/0/
    mv remount_swap.sh /sbin/.magisk/img/.core/service.d/
    cd /sbin/.magisk/img/.core/service.d/
    chmod +x remount_swap.sh
    adb reboot
    20
    Hello there..
    First of all I am apologize for the delay. I am still experimenting and trying different settings with the new ROM and kernel. So far so good.... Kernel and ROM, both are almost ready, But I am still working with a script in order to create and use zram as a swap space/ virtual memory. It is the best combination of RAM and disk space. It seems it doesn't use the CPU all the time...which means doesn't reduce the battery. I tried different settings of zram and swap and end up with this..balance with CPU usage and battery. It boost the speed and gives more memory and good battery..Almost 3 days of battery..(ofc depends how much u use the watch)

    The scripts is also done now...I am happy with that. I also implement init.d in the ROM in order to use the script automatically. It is also possible to just flash the script in TWRP. I just need to clean up and take sometime to upload the ROM.

    I would also like to thanks those who have donated me. I really appreciate that. Thank you so much for your donation.

    I am also start working with Ticwatch C2 and Ticwatch Pro 4G. New ROM and kernel for both devices are coming too.
    14
    Hi all.
    This is perfect way to get Gpay on your watch. Tested by TicWatch Pro

    Go to https://sqlite.org/download.html and download sqlite-tools-win32-x86-3280000.zip
    Unzip and use sqlite3.exe
    You have to got ADB files

    Let's go

    0. Commands start to execute from cmd, so that adb and sqlite3 was visible from there (put in the desired directory, or run with the full path)
    1. Enable Developer on watch (click on the build number in about watch")
    2. Enable adb debugging
    3. Open cmd On PC (adb folder with adb files)
    4. Execute
    Code:
    adb shell
    You should see an invitation with "$"
    5. Execute
    Code:
    su
    confirm on the clock. If suddenly not confirmed, and left Permission denied, find in Magisk Manager and confirm manually.
    6. Execute
    Code:
    cp /data/data/com.google.android.gms/databases/dg.db /mnt/sdcard
    copy the database to where the file can be easily copied to the PC
    7. Open an additional cmd window (in ADB folder)
    Execute
    Code:
    adb pull /mnt/sdcard/dg.db
    The database will be copied to the PC in the current directory
    8. In the same terminal window run
    Code:
    sqlite3.exe dg.db
    you will be prompted with ">"
    9. Execute
    Code:
    update main set c = 0 where a like 'attest%';
    Change the value of the 3rd column ("c") to 0 if the first ("a") starts with attest
    10. Exit sqlite (press Ctrl-D)
    11. Push the file back on the clock
    Code:
    adb push dg.db /mnt/sdcard
    12. Select the first open window with "adb shell"
    Code:
    cp /mnt/sdcard /data/data/com.google.android.gms/databases/dg.db
    13. Changing access rules
    Code:
    chmod 440 /data/data/com.google.android.gms/databases/dg.db
    Go to Gpay on your watch and add your credit card
    12
    /*
    * Your warranty is now void.
    * I am not responsible for bricked devices, bootloop and dead SD cards,
    * YOU are choosing to make these modifications, and if
    * you point the finger at us for messing up your device, we will laugh at you.
    */

    Download : TWRP For Catshark 4G/LTE
    Source Device Tree: Device Tree For Building TWRP


    ###############################
    ###############################


    How to get the Gpay back...

    1-https://pastebin.com/HKV7cj7H

    2-https://xdaforums.com/smartwatch/other-smartwatches/rom-kernel-t3821013/page172

    3-https://www.youtube.com/watch?v=UKxGfNxRjo4&t=320s

    4-https://xdaforums.com/showpost.php?p=79637148&postcount=1720


    Be aware for this in future....19 April 2020

    https://mobile.twitter.com/topjohnwu/status/1245956080779198464