Author Topic: Hacking the HDO1k/HDO4k Rigol 12 bit scope  (Read 186785 times)

0 Members and 6 Guests are viewing this topic.

Offline RobbiOne

  • Contributor
  • Posts: 13
  • Country: it
Re: Hacking the HDO1k/HDO4k Rigol 12 bit scope
« Reply #625 on: December 26, 2023, 12:32:44 am »
Is there some place where the instructions for the hack are available?
I have Rigol DHO1074 and wanted to do the hack but I can’t figure out where to find the files and instructions for the hack.

Thanks in advance.

Just done with success on my 1074, here there is the file with a step by step guide (extracted here and there from this forum) for upgrading the 1000 and 4000 series.

Thanks to all here for the great support done.
 
The following users thanked this post: egonotto, firefly-10, lgo51, RFDx, sizziff

Offline firefly-10

  • Newbie
  • Posts: 5
  • Country: de
Re: Hacking the HDO1k/HDO4k Rigol 12 bit scope
« Reply #626 on: December 26, 2023, 02:16:52 am »
Is there some place where the instructions for the hack are available?
I have Rigol DHO1074 and wanted to do the hack but I can’t figure out where to find the files and instructions for the hack.

Thanks in advance.

Just done with success on my 1074, here there is the file with a step by step guide (extracted here and there from this forum) for upgrading the 1000 and 4000 series.

Thanks to all here for the great support done.

Thank you very much. I (and I think a few others) have been waiting for instructions like this for those who don't necessarily want to turn their DHO1K into a DHO4K.  They just want to unlock the other options of their DHO's and nothing more.  ;D

Thanks again for that !!!  ;D
 

Offline TurboTom

  • Super Contributor
  • ***
  • Posts: 1413
  • Country: de
Re: Hacking the HDO1k/HDO4k Rigol 12 bit scope
« Reply #627 on: December 26, 2023, 10:25:17 am »
...

Thank you very much. I (and I think a few others) have been waiting for instructions like this for those who don't necessarily want to turn their DHO1K into a DHO4K.  They just want to unlock the other options of their DHO's and nothing more.  ;D

...

Yes, that's the way it always starts... But if you know that there's still more functions hidden in the box, you start to reconsider  ;D ...

- 50 Ohm inputs
- Possibly single channel 800MHz BW
- 200/250MSa of memory
- Power Analysis
- additional decoders MIL-STD 1533, FlexRay (those are least relevant since if you're in that business, you simply buy the "real thing" and probably not even from Rigol  ;))

I don't know why, must be in the "hunter gatherer genes" that it makes one feel good to get the optimum from one's tools/toys, regardless if necessary for the "job" or not.  8)
 
The following users thanked this post: egonotto, ebastler

Offline ebastler

  • Super Contributor
  • ***
  • Posts: 6752
  • Country: de
Re: Hacking the HDO1k/HDO4k Rigol 12 bit scope
« Reply #628 on: December 26, 2023, 10:47:42 am »
Plus the I2S audio decoder, hopefully, which is also limited to the DHO4000 series in Rigol's opinion.
 
The following users thanked this post: TurboTom

Online Martin72

  • Super Contributor
  • ***
  • Posts: 6433
  • Country: de
  • Testfield Technician
Re: Hacking the HDO1k/HDO4k Rigol 12 bit scope
« Reply #629 on: December 26, 2023, 12:38:33 pm »
Quote
I don't know why, must be in the "hunter gatherer genes" that it makes one feel good to get the optimum from one's tools/toys, regardless if necessary for the "job" or not.

Having and (really) needing have always been two different things, whereby having has always been better than needing.
And then it also has to work. :-X
When ARINC429 was added as a decoder option (Siglent), I absolutely had to have this option permanently.
I will never use it in my life. ;)
Quote
MIL-STD 1533
We use the protocol for a project, the USB interface alone costs about 5000€, for that you get 3 Siglent SDS2104X+ or 2 DHO4204...

"Comparison is the end of happiness and the beginning of dissatisfaction."
(Kierkegaard)
Siglent SDS800X HD Deep Review
 

Offline bosav

  • Newbie
  • Posts: 9
  • Country: nl
Re: Hacking the HDO1k/HDO4k Rigol 12 bit scope
« Reply #630 on: December 26, 2023, 04:14:26 pm »
Update on #594

Figured out how to make the scope run pathed code, ignoring the signatures. (inspired by https://github.com/giacomoferretti/odex-patcher)

The trick is that besides the installed apk, there is also precompiled code generated on install (odex). Which having root permissions can be replaced, and can be used without signature verification.  Also, this is relatively safe and can be reverted - simply reinstalling the app, will recreate those files.

step by step, how to update odex file:
Code: [Select]
# push patched apk to the device
adb push Auklet.apk /sdcard/Download/base.apk

# login onto the device as root (needed for dex2oat to work)
adb root
adb shell

# on the device generate odex file from the patched code, using arguments similar to those found in the original odex file
cd /sdcard/Download
dex2oat --instruction-set=arm64 --instruction-set-variant=cortex-a53 --instruction-set-features=default --compiler-filter=verify-profile  --dex-file=base.apk --oat-file=base.odex

# pull generated odex file from the device for patching dex hashes in it
adb pull /sdcard/Download/base.odex

# to make android use new odex file, we need to replace file hashes for dex files in it(so it is not re-generated)

# crc32 hashes before code changes
#    b09a1260 classes.dex
#    5ebcb7e4 classes2.dex

# after code changes
#    b0aabf7e classes.dex
#    23e082b5 classes2.dex

# using some hex editor, this would be two replacements in odex file
#  7ebfaab0 -> 60129ab0
#  b582e023 -> e4b7bc5e
# (if there are multiple places with this data - the ones to change should be close together, at the beginning of the file, near ".dex", in my case however there was just one entry… for more "reliable/correct" approach - check odex-patcher code mentioned above for references about odex file format)


# push patched odex file back (using a different file name to avoid replacing the original with bad permissions)
adb push base.odex /data/app/com.rigol.scope-1/oat/arm64/base1.odex

# on the device, list files in the target folder to see the ownership
ls -la /data/app/com.rigol.scope-1/oat/arm64/base.odex
#   -rw-rw---- 1 system u0_a31000 15172224 2023-12-25 21:05 /data/app/com.rigol.scope-1/oat/arm64/base.odex

# change owner for added file to match original
chown system:u0_a31000 /data/app/com.rigol.scope-1/oat/arm64/base1.odex

# replace the original odex file
mv /data/app/com.rigol.scope-1/oat/arm64/base1.odex /data/app/com.rigol.scope-1/oat/arm64/base.odex

# done, restart the app/scope - to see the changes

This made the changes mentioned in the original post appear in the UI.

However, the 50Ω impedance switch, while visible and clickable - but did not worked, because of checks also in libscope-auklet.so blocking it.

Looking into libscope using Ghidra(https://ghidra-sre.org/), found some interesting usages of _Z20API_GetProductSeriesv

For 50Ω input specifically _ZN12CApiVertical23ApiChannel_SetImpedanceEj was easy to patch:

Code: [Select]
# find & replace in a hex editor (added a prefix to make it unique in the file)
f30300aa6ccefc971f0800710101005499e1fc971f401f71
f30300aa6ccefc971f0800710101005499e1fc9706000014

Using the same approach, pushed the patched libscope file to the device:

Code: [Select]
# push the patched file to apk install location
adb root
adb push libscope-auklet.so /data/app/com.rigol.scope-1/lib/arm64/libscope-auklet.so

# fix permissions in adb shell
chown system:u0_a31000 /data/app/com.rigol.scope-1/lib/arm64/libscope-auklet.so

After restarting the scope - the toggling of input impedance appeared working (the relay does click, DC offset also was corrected after running self-calibration).

« Last Edit: December 26, 2023, 04:25:13 pm by bosav »
 
The following users thanked this post: egonotto, thm_w, voltsandjolts, tv84, TurboTom, ebastler, ZigmundRat, zrq, lgo51, lownoise, x33yp, sizziff

Offline Dennis Frie

  • Contributor
  • Posts: 25
  • Country: dk
Re: Hacking the HDO1k/HDO4k Rigol 12 bit scope
« Reply #631 on: December 26, 2023, 06:50:17 pm »
Update on #594

Figured out how to make the scope run pathed code, ignoring the signatures. (inspired by https://github.com/giacomoferretti/odex-patcher)

The trick is that besides the installed apk, there is also precompiled code generated on install (odex). Which having root permissions can be replaced, and can be used without signature verification.  Also, this is relatively safe and can be reverted - simply reinstalling the app, will recreate those files.

step by step, how to update odex file:
Code: [Select]
# push patched apk to the device
adb push Auklet.apk /sdcard/Download/base.apk

# login onto the device as root (needed for dex2oat to work)
adb root
adb shell

# on the device generate odex file from the patched code, using arguments similar to those found in the original odex file
cd /sdcard/Download
dex2oat --instruction-set=arm64 --instruction-set-variant=cortex-a53 --instruction-set-features=default --compiler-filter=verify-profile  --dex-file=base.apk --oat-file=base.odex

# pull generated odex file from the device for patching dex hashes in it
adb pull /sdcard/Download/base.odex

# to make android use new odex file, we need to replace file hashes for dex files in it(so it is not re-generated)

# crc32 hashes before code changes
#    b09a1260 classes.dex
#    5ebcb7e4 classes2.dex

# after code changes
#    b0aabf7e classes.dex
#    23e082b5 classes2.dex

# using some hex editor, this would be two replacements in odex file
#  7ebfaab0 -> 60129ab0
#  b582e023 -> e4b7bc5e
# (if there are multiple places with this data - the ones to change should be close together, at the beginning of the file, near ".dex", in my case however there was just one entry… for more "reliable/correct" approach - check odex-patcher code mentioned above for references about odex file format)


# push patched odex file back (using a different file name to avoid replacing the original with bad permissions)
adb push base.odex /data/app/com.rigol.scope-1/oat/arm64/base1.odex

# on the device, list files in the target folder to see the ownership
ls -la /data/app/com.rigol.scope-1/oat/arm64/base.odex
#   -rw-rw---- 1 system u0_a31000 15172224 2023-12-25 21:05 /data/app/com.rigol.scope-1/oat/arm64/base.odex

# change owner for added file to match original
chown system:u0_a31000 /data/app/com.rigol.scope-1/oat/arm64/base1.odex

# replace the original odex file
mv /data/app/com.rigol.scope-1/oat/arm64/base1.odex /data/app/com.rigol.scope-1/oat/arm64/base.odex

# done, restart the app/scope - to see the changes

This made the changes mentioned in the original post appear in the UI.

However, the 50Ω impedance switch, while visible and clickable - but did not worked, because of checks also in libscope-auklet.so blocking it.

Looking into libscope using Ghidra(https://ghidra-sre.org/), found some interesting usages of _Z20API_GetProductSeriesv

For 50Ω input specifically _ZN12CApiVertical23ApiChannel_SetImpedanceEj was easy to patch:

Code: [Select]
# find & replace in a hex editor (added a prefix to make it unique in the file)
f30300aa6ccefc971f0800710101005499e1fc971f401f71
f30300aa6ccefc971f0800710101005499e1fc9706000014

Using the same approach, pushed the patched libscope file to the device:

Code: [Select]
# push the patched file to apk install location
adb root
adb push libscope-auklet.so /data/app/com.rigol.scope-1/lib/arm64/libscope-auklet.so

# fix permissions in adb shell
chown system:u0_a31000 /data/app/com.rigol.scope-1/lib/arm64/libscope-auklet.so

After restarting the scope - the toggling of input impedance appeared working (the relay does click, DC offset also was corrected after running self-calibration).

Really nice work. Using the dex2oat is an interesting approach, but modifying the manifest and installing it as a new application, seems like an easier way. At least for initial testing.

Good work on the libscope, that's a great find  :clap:. I have to try that, thanks.
 
The following users thanked this post: egonotto, lgo51, RobbiOne

Online voltsandjolts

  • Supporter
  • ****
  • Posts: 2367
  • Country: gb
Re: Hacking the HDO1k/HDO4k Rigol 12 bit scope
« Reply #632 on: December 26, 2023, 06:59:58 pm »
Excellent, nice work, good to know that the fpga bitstream doesn't play a part in disabling use of the 50 Ohm inputs.
 
The following users thanked this post: egonotto

Online zrq

  • Frequent Contributor
  • **
  • Posts: 317
  • Country: 00
Re: Hacking the HDO1k/HDO4k Rigol 12 bit scope
« Reply #633 on: December 26, 2023, 07:56:42 pm »
I think patching the .so on the fly is actually easier, it would be nice if I know this earlier. In my experiments, there is no need to touch the java codes, so the patching can be done quite simply with just adb and a hex editor (or programmatically).
 
The following users thanked this post: egonotto

Offline RFDx

  • Regular Contributor
  • *
  • Posts: 161
  • Country: de
Re: Hacking the HDO1k/HDO4k Rigol 12 bit scope
« Reply #634 on: December 27, 2023, 02:46:56 am »
Most "fellas" interested in Rigol's DHO 800/900/1k/4k may have followed the other thread about the broken FlatTop FFT window function. I wrote a small basic (yes, really!  ;) ) program that calculates the correct window file -- the windows executable is attached.

Thank you very much, works now as it should. Is the repair of the flattop window function to be done every time there is a new firmware update?
 

Offline TurboTom

  • Super Contributor
  • ***
  • Posts: 1413
  • Country: de
Re: Hacking the HDO1k/HDO4k Rigol 12 bit scope
« Reply #635 on: December 27, 2023, 09:41:57 am »
Most "fellas" interested in Rigol's DHO 800/900/1k/4k may have followed the other thread about the broken FlatTop FFT window function. I wrote a small basic (yes, really!  ;) ) program that calculates the correct window file -- the windows executable is attached.

Thank you very much, works now as it should. Is the repair of the flattop window function to be done every time there is a new firmware update?

Yes, I'm afraid it is -- unless Rigol adopts the fixed window function file (or generate their own) in their firmware update package. But it will be the same situation with advanced hacks that several members are working on, once they become available -- only that there will be zero chance for Rigol "adopting" them  ;D.
 

Offline DigitalDeath

  • Regular Contributor
  • *
  • Posts: 62
  • Country: us
Re: Hacking the HDO1k/HDO4k Rigol 12 bit scope
« Reply #636 on: December 27, 2023, 10:46:12 am »
Yes, that's the way it always starts... But if you know that there's still more functions hidden in the box, you start to reconsider  ;D ...

- 50 Ohm inputs
- Possibly single channel 800MHz BW
- 200/250MSa of memory
- Power Analysis
- additional decoders MIL-STD 1533, FlexRay (those are least relevant since if you're in that business, you simply buy the "real thing" and probably not even from Rigol  ;))

I don't know why, must be in the "hunter gatherer genes" that it makes one feel good to get the optimum from one's tools/toys, regardless if necessary for the "job" or not.  8)

Sorry if this has been discussed before but do you mean I can activate the 4K functions in the 1K scope?
 

Offline Antonio90

  • Frequent Contributor
  • **
  • Posts: 338
  • Country: es
Re: Hacking the HDO1k/HDO4k Rigol 12 bit scope
« Reply #637 on: December 27, 2023, 11:04:39 am »
Yes, with caveats. You can change the vendor.bin to make the 1000 think it's a 4000. It doesn't work properly that way, as the 4000 uses 2 ADCs interleaved, and it messes the acquisition.

However, the rest of the hardware is identical, and it seems like the firmware could be modified to add the 4000 functionality in TurboTom's post, which doesn't need additional hardware.

Hence the (unlikely IMO) 800MHz on one channel, and the 200/250 MPts, as the full 500 requires two ADCs. Power analysis should be the easiest option, and the memory and 50Ohm the most useful I guess.
 

Offline ebastler

  • Super Contributor
  • ***
  • Posts: 6752
  • Country: de
Re: Hacking the HDO1k/HDO4k Rigol 12 bit scope
« Reply #638 on: December 27, 2023, 11:57:43 am »
Sorry if this has been discussed before but do you mean I can activate the 4K functions in the 1K scope?

The approach Antonio90 describes has been tried, but has massive side effects. Among other things, it disables two of the four channels, since the second ADC is missing in the DHO1000 models.

There is a better approach: Patching the Auklet Android app in those places where it checks which functionality should be available or restricted, based on the current scope model. This is still work in progress. Just read the most recent two or three pages of this thread, especially the posts by zrq, Dennis Frie and bosav, to come up to speed.

Finger crossed that this method will be fully worked out! The 50 Ohm inputs and 400 MHz bandwidth would be my favorite features. One nice feature of the DHO4000 is that it lets the user switch between three bandwidth settings: 20 MHz, 200 MHz and full. So one could use 200 MHz bandwidth in four-channel mode, and 400 MHz with two channels.
« Last Edit: December 27, 2023, 12:03:02 pm by ebastler »
 
The following users thanked this post: egonotto, Antonio90

Offline Antonio90

  • Frequent Contributor
  • **
  • Posts: 338
  • Country: es
Re: Hacking the HDO1k/HDO4k Rigol 12 bit scope
« Reply #639 on: December 27, 2023, 12:16:37 pm »
It seems quite plausible. 400MHz, 50 Ohm, power analysis and 200MPts for 720€ (incl VAT) is an incredible bargain. Maybe the bandwith is the least likely? I really don't know.
 
The following users thanked this post: egonotto

Online zrq

  • Frequent Contributor
  • **
  • Posts: 317
  • Country: 00
Re: Hacking the HDO1k/HDO4k Rigol 12 bit scope
« Reply #640 on: December 27, 2023, 02:09:32 pm »
The bandwidth actually seems real...
But I just noticed two more problems after patching: 1.screenshot not working, which I suspect it has something to do with the side by side installation of patched APK, going to try the .so replacement later. 2. when the impedance is switched to 50Ohm and in 1V/div vertical range, the signal amplitude is several times higher then it supposed to be. More careful investigation shows the incorrect amplitude happens at 500 mV/div and 200 mV/div, the reading is smaller than expected by roughly 1/2, 1 V/div is a few percents off (~5%), and all other ranges seems to be fine. One can still drive the signal to full scale without visible distortion, so it's probably not a simple software calibration constant that is off but the AFE gain is set incorrectly.
« Last Edit: December 27, 2023, 06:41:20 pm by zrq »
 
The following users thanked this post: egonotto, thm_w, ebastler, lownoise, x33yp, sizziff

Online zrq

  • Frequent Contributor
  • **
  • Posts: 317
  • Country: 00
Re: Hacking the HDO1k/HDO4k Rigol 12 bit scope
« Reply #641 on: December 27, 2023, 07:02:16 pm »
OK my instinct is right, the screenshot problem disappears if I use bosav's method for patching the native binary instead of recompiling the apk. Also worth mentioning, somehow on my scope, the com.rigol.scope-2 is the right folder name instead of com.rigol.scope-1.
The 50Ohm gain problem is more stubborn than I expected, fiddled again with DrvChannel_SetScale but no success, running out of ideas now...
« Last Edit: December 27, 2023, 07:12:29 pm by zrq »
 
The following users thanked this post: egonotto

Offline bosav

  • Newbie
  • Posts: 9
  • Country: nl
Re: Hacking the HDO1k/HDO4k Rigol 12 bit scope
« Reply #642 on: December 27, 2023, 07:34:54 pm »
OK my instinct is right, the screenshot problem disappears if I use bosav's method for patching the native binary instead of recompiling the apk. Also worth mentioning, somehow on my scope, the com.rigol.scope-2 is the right folder name instead of com.rigol.scope-1.
The 50Ohm gain problem is more stubborn than I expected, fiddled again with DrvChannel_SetScale but no success, running out of ideas now...

It can be about calibration, many calibration-related functions also check for product series - one in particular that might be related _ZN16CCalibration_Afe10CalAfeZeroEj  (as it looks to change impedance when running).

Also, there looks to be some log messages during calibration - running "adb logcat" might give some useful data, if there is a calibration issue.
On calibration btw, there are also more options when in "TestMode: ON", which have by default disabled ADC Gain options (to enter click "About" 3 times)
« Last Edit: December 27, 2023, 08:57:46 pm by bosav »
 
The following users thanked this post: egonotto, lownoise, x33yp

Offline sizziff

  • Newbie
  • Posts: 9
  • Country: by
Re: Hacking the HDO1k/HDO4k Rigol 12 bit scope
« Reply #643 on: December 28, 2023, 11:34:44 am »
Hello everyone.
I opened 1072 to 200 MHz .
Thank you all very much.

As I understand it, 50 ohms is still a problem, but in the screenshot above, which zrq posted, the 1074 oscilloscope displays an 800 MHz signal, is such a hack already available?
How can it be implemented?

#The instructions have the following command:
adb push Auklet.apk /sdcard/Download/base.apk

And where can I get a ready-made patched Auklet.apk?
 

Offline ebastler

  • Super Contributor
  • ***
  • Posts: 6752
  • Country: de
Re: Hacking the HDO1k/HDO4k Rigol 12 bit scope
« Reply #644 on: December 28, 2023, 12:48:53 pm »
Hello everyone.
I opened 1072 to 200 MHz .
Thank you all very much.

As I understand it, 50 ohms is still a problem, but in the screenshot above, which zrq posted, the 1074 oscilloscope displays an 800 MHz signal, is such a hack already available?
How can it be implemented?

#The instructions have the following command:
adb push Auklet.apk /sdcard/Download/base.apk

And where can I get a ready-made patched Auklet.apk?

You can't get a ready-made Auklet app yet, this is still work in progress. Why don't you read the last two or three pages of this thread? Yes, it's a long thread already, but it does not help to add more posts with repeat questions just because you can't be bothered to read...
 
The following users thanked this post: egonotto, thm_w, TurboTom, ZigmundRat, x33yp

Offline Dennis Frie

  • Contributor
  • Posts: 25
  • Country: dk
Re: Hacking the HDO1k/HDO4k Rigol 12 bit scope
« Reply #645 on: December 28, 2023, 02:37:53 pm »
While testing code changes, I feel more comfortable using a modified APK in parallel, just in case I do something stupid  ;). However, I keep getting the error  "RIGOL.SCOPE has stopped" when trying to launch the modified version.
I've decompiled the Auklet.apk using apktool, changed the Manifest, recompiled, resigned and installed the new APK. I've tried to kill the Scope process before starting the new APK, but I keep getting the same error.

Any good ideas what might be causing this issue?

« Last Edit: December 28, 2023, 02:41:54 pm by Dennis Frie »
 

Offline bosav

  • Newbie
  • Posts: 9
  • Country: nl
Re: Hacking the HDO1k/HDO4k Rigol 12 bit scope
« Reply #646 on: December 28, 2023, 02:56:51 pm »
While testing code changes, I feel more comfortable using a modified APK in parallel, just in case I do something stupid  ;). However, I keep getting the error  "RIGOL.SCOPE has stopped" when trying to launch the modified version.
I've decompiled the Auklet.apk using apktool, changed the Manifest as needed, recompiled, resigned and installed the new APK. I've tried to kill the Scope process before starting the new APK, but I keep getting the same error.

Any good ideas what might be causing this issue?

I have not really managed to run the patched APK without the issues - that is why ended up patching odex files instead :)
With patched odex files btw, you can always reinstall the original apk effectively reverting the patches.

The problem as far as I understand is mostly about the permissions of the user running a separately installed app - the original app uses shared user with system permissions, but the one installed separately by default - does not (I saw some errors in logs while trying about it not having access to some files).

As an option for fixing it - you can try installing it in "/system/priv-app". However, that is likely to require more fixes, at least - renamed providers are likely to require more changes in code using them.
 

Offline TurboTom

  • Super Contributor
  • ***
  • Posts: 1413
  • Country: de
Re: Hacking the HDO1k/HDO4k Rigol 12 bit scope
« Reply #647 on: December 28, 2023, 03:02:53 pm »
Here's a list of the active processes running on my DHO1074:

Code: [Select]
USER      PID   PPID  VSIZE  RSS   WCHAN              PC  NAME
root      1     0     10524  2012  SyS_epoll_ 00004ccd60 S /init
root      2     0     0      0       kthreadd 0000000000 S kthreadd
root      3     2     0      0     smpboot_th 0000000000 S ksoftirqd/0
root      4     2     0      0     worker_thr 0000000000 S kworker/0:0
root      5     2     0      0     worker_thr 0000000000 S kworker/0:0H
root      6     2     0      0     worker_thr 0000000000 S kworker/u12:0
root      7     2     0      0     rcu_gp_kth 0000000000 S rcu_preempt
root      8     2     0      0     rcu_gp_kth 0000000000 S rcu_sched
root      9     2     0      0     rcu_gp_kth 0000000000 S rcu_bh
root      10    2     0      0     smpboot_th 0000000000 S migration/0
root      11    2     0      0     smpboot_th 0000000000 S watchdog/0
root      12    2     0      0     smpboot_th 0000000000 S watchdog/1
root      13    2     0      0     smpboot_th 0000000000 S migration/1
root      14    2     0      0     smpboot_th 0000000000 S ksoftirqd/1
root      15    2     0      0     worker_thr 0000000000 S kworker/1:0
root      16    2     0      0     worker_thr 0000000000 S kworker/1:0H
root      17    2     0      0     smpboot_th 0000000000 S watchdog/2
root      18    2     0      0     smpboot_th 0000000000 S migration/2
root      19    2     0      0     smpboot_th 0000000000 S ksoftirqd/2
root      20    2     0      0     worker_thr 0000000000 S kworker/2:0
root      21    2     0      0     worker_thr 0000000000 S kworker/2:0H
root      22    2     0      0     smpboot_th 0000000000 S watchdog/3
root      23    2     0      0     smpboot_th 0000000000 S migration/3
root      24    2     0      0     smpboot_th 0000000000 S ksoftirqd/3
root      25    2     0      0     worker_thr 0000000000 S kworker/3:0
root      26    2     0      0     worker_thr 0000000000 S kworker/3:0H
root      27    2     0      0     smpboot_th 0000000000 S watchdog/4
root      28    2     0      0     smpboot_th 0000000000 S migration/4
root      29    2     0      0     smpboot_th 0000000000 S ksoftirqd/4
root      30    2     0      0     worker_thr 0000000000 S kworker/4:0
root      31    2     0      0     worker_thr 0000000000 S kworker/4:0H
root      32    2     0      0     smpboot_th 0000000000 S watchdog/5
root      33    2     0      0     smpboot_th 0000000000 S migration/5
root      34    2     0      0     smpboot_th 0000000000 S ksoftirqd/5
root      35    2     0      0     worker_thr 0000000000 S kworker/5:0
root      36    2     0      0     worker_thr 0000000000 S kworker/5:0H
root      37    2     0      0      devtmpfsd 0000000000 S kdevtmpfs
root      38    2     0      0     rescuer_th 0000000000 S netns
root      39    2     0      0     rescuer_th 0000000000 S perf
root      40    2     0      0     console_th 0000000000 S kconsole
root      41    2     0      0       watchdog 0000000000 S khungtaskd
root      42    2     0      0     rescuer_th 0000000000 S writeback
root      43    2     0      0     ksm_scan_t 0000000000 S ksmd
root      44    2     0      0     rescuer_th 0000000000 S crypto
root      45    2     0      0     rescuer_th 0000000000 S bioset
root      46    2     0      0     rescuer_th 0000000000 S kblockd
root      47    2     0      0     worker_thr 0000000000 S kworker/4:1
root      48    2     0      0     rescuer_th 0000000000 S devfreq_wq
root      49    2     0      0     rescuer_th 0000000000 S cfg80211
root      50    2     0      0     cpufreq_in 0000000000 S cfinteractive
root      51    2     0      0     worker_thr 0000000000 S kworker/u12:1
root      52    2     0      0     rescuer_th 0000000000 S rpciod
root      67    2     0      0         kswapd 0000000000 S kswapd0
root      68    2     0      0     rescuer_th 0000000000 S vmstat
root      69    2     0      0     fsnotify_m 0000000000 S fsnotify_mark
root      70    2     0      0     rescuer_th 0000000000 S nfsiod
root      71    2     0      0     rescuer_th 0000000000 S cifsiod
root      103   2     0      0     irq_thread 0000000000 S irq/225-rockchi
root      104   2     0      0     irq_thread 0000000000 S irq/226-rockchi
root      105   2     0      0     irq_thread 0000000000 S irq/227-rockchi
root      106   2     0      0     irq_thread 0000000000 S irq/228-rockchi
root      107   2     0      0     irq_thread 0000000000 S irq/229-rockchi
root      108   2     0      0     irq_thread 0000000000 S irq/46-ff670000
root      109   2     0      0     rescuer_th 0000000000 S vcodec
root      110   2     0      0     irq_thread 0000000000 S irq/42-ff650000
root      111   2     0      0     irq_thread 0000000000 S irq/41-ff650000
root      112   2     0      0     rescuer_th 0000000000 S vcodec
root      113   2     0      0     irq_thread 0000000000 S irq/44-ff660000
root      114   2     0      0     rescuer_th 0000000000 S bioset
root      115   2     0      0     rescuer_th 0000000000 S bioset
root      116   2     0      0     rescuer_th 0000000000 S bioset
root      117   2     0      0     rescuer_th 0000000000 S bioset
root      118   2     0      0     rescuer_th 0000000000 S bioset
root      119   2     0      0     rescuer_th 0000000000 S bioset
root      120   2     0      0     rescuer_th 0000000000 S bioset
root      121   2     0      0     rescuer_th 0000000000 S bioset
root      122   2     0      0     rescuer_th 0000000000 S bioset
root      123   2     0      0     rescuer_th 0000000000 S bioset
root      124   2     0      0     rescuer_th 0000000000 S bioset
root      125   2     0      0     rescuer_th 0000000000 S bioset
root      126   2     0      0     rescuer_th 0000000000 S bioset
root      127   2     0      0     rescuer_th 0000000000 S bioset
root      128   2     0      0     rescuer_th 0000000000 S bioset
root      129   2     0      0     rescuer_th 0000000000 S bioset
root      130   2     0      0     rescuer_th 0000000000 S bioset
root      131   2     0      0     rescuer_th 0000000000 S bioset
root      132   2     0      0     rescuer_th 0000000000 S bioset
root      133   2     0      0     rescuer_th 0000000000 S bioset
root      134   2     0      0     rescuer_th 0000000000 S bioset
root      135   2     0      0     rescuer_th 0000000000 S bioset
root      136   2     0      0     rescuer_th 0000000000 S bioset
root      137   2     0      0     rescuer_th 0000000000 S bioset
root      138   2     0      0     rescuer_th 0000000000 S bioset
root      139   2     0      0     rescuer_th 0000000000 S nvme
root      140   2     0      0     kthread_wo 0000000000 S spi1
root      141   2     0      0     kthread_wo 0000000000 S spi2
root      143   2     0      0     worker_thr 0000000000 S kworker/0:1
root      145   2     0      0     worker_thr 0000000000 S kworker/2:1
root      146   2     0      0     worker_thr 0000000000 S kworker/3:1
root      147   2     0      0     irq_thread 0000000000 S irq/116-rk808
root      148   2     0      0     irq_thread 0000000000 S irq/36-rockchip
root      149   2     0      0     rescuer_th 0000000000 S dm_bufio_cache
root      150   2     0      0     worker_thr 0000000000 S kworker/1:1
root      151   2     0      0     worker_thr 0000000000 S kworker/1:2
root      152   2     0      0     worker_thr 0000000000 S kworker/5:1
root      153   2     0      0     irq_thread 0000000000 S irq/27-mmc2
root      154   2     0      0     worker_thr 0000000000 S kworker/5:2
root      155   2     0      0     worker_thr 0000000000 S kworker/2:2
root      156   2     0      0     rescuer_th 0000000000 S binder
root      157   2     0      0     irq_thread 0000000000 S irq/130-rx8010
root      158   2     0      0     rescuer_th 0000000000 S ipv6_addrconf
root      159   2     0      0     wait_woken 0000000000 S krfcommd
root      161   2     0      0     irq_thread 0000000000 S irq/47-rga
root      162   2     0      0     rescuer_th 0000000000 S deferwq
root      163   2     0      0     rescuer_th 0000000000 S hpd_queue
root      164   2     0      0     irq_thread 0000000000 S irq/56-ff940000
root      165   2     0      0     worker_thr 0000000000 S kworker/5:3
root      166   2     0      0     rescuer_th 0000000000 S bioset
root      167   2     0      0     mmc_queue_ 0000000000 S mmcqd/2
root      168   2     0      0     rescuer_th 0000000000 S bioset
root      169   2     0      0     mmc_queue_ 0000000000 S mmcqd/2boot0
root      170   2     0      0     rescuer_th 0000000000 S bioset
root      171   2     0      0     mmc_queue_ 0000000000 S mmcqd/2boot1
root      172   2     0      0     rescuer_th 0000000000 S bioset
root      173   2     0      0     mmc_queue_ 0000000000 S mmcqd/2rpmb
root      174   2     0      0     rescuer_th 0000000000 S gpu_power_off_w
root      175   2     0      0     worker_thr 0000000000 S kworker/u13:0
root      176   2     0      0     worker_thr 0000000000 S kworker/u13:1
root      177   2     0      0     rescuer_th 0000000000 S kbase_job_fault
root      178   2     0      0     worker_thr 0000000000 S kworker/u12:2
root      179   2     0      0     worker_thr 0000000000 S kworker/u12:3
root      180   2     0      0     worker_thr 0000000000 S kworker/u12:4
root      181   1     5780   1064  poll_sched 00004ccd90 S /sbin/ueventd
root      182   2     0      0     worker_thr 0000000000 S kworker/3:2
root      183   2     0      0     worker_thr 0000000000 S kworker/3:3
root      185   2     0      0     worker_thr 0000000000 S kworker/5:1H
root      186   2     0      0     kjournald2 0000000000 S jbd2/mmcblk2p10
root      187   2     0      0     rescuer_th 0000000000 S ext4-rsv-conver
root      189   2     0      0     kjournald2 0000000000 S jbd2/mmcblk2p9-
root      190   2     0      0     rescuer_th 0000000000 S ext4-rsv-conver
root      194   2     0      0     kjournald2 0000000000 S jbd2/mmcblk2p11
root      195   2     0      0     rescuer_th 0000000000 S ext4-rsv-conver
root      199   2     0      0     kjournald2 0000000000 S jbd2/mmcblk2p16
root      200   2     0      0     rescuer_th 0000000000 S ext4-rsv-conver
root      202   2     0      0     kjournald2 0000000000 S jbd2/mmcblk2p15
root      203   2     0      0     rescuer_th 0000000000 S ext4-rsv-conver
logd      204   1     18924  3496  sigsuspend 789c7e3d4c S /system/bin/logd
root      209   2     0      0     kauditd_th 0000000000 S kauditd
root      213   1     5348   2312  __skb_recv 00f0eb14a8 S /system/bin/debuggerd
root      214   1     10160  2776  __skb_recv 79dab22b24 S /system/bin/debuggerd64
root      215   1     19160  5952  hrtimer_na 7903c96574 S /system/bin/vold
root      216   214   9904   672   __skb_recv 79dab2367c S debuggerd64:signaller
root      218   213   5092   532   __skb_recv 00f0eb26dc S debuggerd:signaller
root      224   1     6432   932   SyS_epoll_ 000047cc78 S /sbin/healthd
root      226   1     8932   2940  SyS_epoll_ 7d841d0b84 S /system/bin/lmkd
system    227   1     9156   2428  binder_thr 731e775c74 S /system/bin/servicemanager
system    228   1     304360 61096 SyS_epoll_ 77733deb84 S /system/bin/surfaceflinger
shell     230   1     7716   2580  wait_woken 7c4eaa367c S /system/bin/sh
shell     231   1     14272  1176  poll_sched 00004a5c90 S /sbin/adbd
root      233   1     4744   476   __skb_recv 0000410c58 S /system/xbin/su
root      237   1     7716   1796  sigsuspend 73b65f4d4c S /system/bin/sh
root      239   1     2154796 130336 poll_sched 7c2695aca4 S zygote64
root      240   1     1592648 114984 poll_sched 00f56e8734 S zygote
audioserver 241   1     27436  8960  binder_thr 00f035668c S /system/bin/audioserver
drm       242   1     13860  6448  binder_thr 00f3d8a68c S /system/bin/drmserver
root      243   1     9620   2448  unix_strea 72ccf9a67c S /system/bin/installd
keystore  244   1     12640  4620  binder_thr 7f1b124c74 S /system/bin/keystore
mediacodec 245   1     28880  8684  binder_thr 00efef668c S media.codec
media     247   1     38440  11824 binder_thr 00ec9a368c S /system/bin/mediadrmserver
mediaex   248   1     43160  9056  binder_thr 00f643968c S media.extractor
media     249   1     69388  14736 binder_thr 00f2ea568c S /system/bin/mediaserver
root      250   1     30004  4940  binder_thr 6fd19c3c74 S /system/bin/netd
root      251   1     10436  3660  poll_sched 7c73c4fcbc S /system/vendor/bin/crashlogd
root      252   1     10188  1852  devkmsg_re 6fdead167c S /vendor/bin/log-watch
system    253   1     12328  4384  binder_thr 7082e26c74 S /system/bin/gatekeeperd
root      255   237   10100  4112  poll_sched 7139d56cbc S /system/bin/sshd
root      256   1     8272   2048  hrtimer_na 7299bde574 S /system/xbin/perfprofd
root      271   1     7716   2496  sigsuspend 70cd06cd4c S /system/bin/sh
root      282   271   9096   1820  __skb_recv 747b1da6dc S /system/vendor/bin/logcatext
root      299   2     0      0     rescuer_th 0000000000 S kbase_event
root      419   2     0      0     worker_thr 0000000000 S kworker/4:1H
root      490   2     0      0     xthread_ma 0000000000 S cmpl_status_th0
root      491   2     0      0     xthread_ma 0000000000 S cmpl_status_th1
root      492   2     0      0     xthread_ma 0000000000 S cmpl_status_th2
root      493   2     0      0     xthread_ma 0000000000 S cmpl_status_th3
root      494   2     0      0     xthread_ma 0000000000 S cmpl_status_th4
root      495   2     0      0     xthread_ma 0000000000 S cmpl_status_th5
root      496   2     0      0     xthread_ma 0000000000 S cmpl_status_th6
root      497   2     0      0     xthread_ma 0000000000 S cmpl_status_th7
system    528   239   2190916 200696 SyS_epoll_ 7c2695ab84 S system_server
root      588   2     0      0              0 0000000000 S kworker/u13:2
root      642   2     0      0     worker_thr 0000000000 S kworker/2:1H
root      664   2     0      0     worker_thr 0000000000 S kworker/1:1H
root      687   2     0      0     rescuer_th 0000000000 S kbase_event
u0_a15    704   239   1792000 154428 SyS_epoll_ 7c2695ab84 S com.android.systemui
system    716   239   1777396 110100 SyS_epoll_ 7c2695ab84 S com.android.settings
root      766   2     0      0     rescuer_th 0000000000 S kbase_event
media_rw  789   215   13872  3440  wait_woken 721cb9d67c S /system/bin/sdcard
root      806   2     0      0     worker_thr 0000000000 S kworker/0:2
root      809   2     0      0     worker_thr 0000000000 S kworker/4:2
root      996   2     0      0     rescuer_th 0000000000 S kbase_event
u0_a5     1007  239   1572436 72908 SyS_epoll_ 7c2695ab84 S android.ext.services
root      1023  2     0      0     worker_thr 0000000000 S kworker/0:1H
system    1053  239   1575108 79708 SyS_epoll_ 7c2695ab84 S android.rockchip.update.service
system    1069  239   1573552 73132 SyS_epoll_ 7c2695ab84 S com.android.keychain
system    1084  239   1757788 113528 SyS_epoll_ 7c2695ab84 S com.rigol.launcher
u0_a4     1113  239   1583724 93024 SyS_epoll_ 7c2695ab84 S android.process.media
root      1116  2     0      0     worker_thr 0000000000 S kworker/3:1H
u0_a27    1131  239   1575552 76140 SyS_epoll_ 7c2695ab84 S com.android.printspooler
system    1157  239   3294924 322592 SyS_epoll_ 7c2695ab84 S com.rigol.scope
u0_a7     1193  239   1573672 73564 SyS_epoll_ 7c2695ab84 S com.android.managedprovisioning
root      1214  2     0      0     rescuer_th 0000000000 S fts_wq
root      1217  2     0      0     rescuer_th 0000000000 S kbase_event
system    1227  239   1594296 97104 SyS_epoll_ 7c2695ab84 S com.rigol.launcher:Watchdog
system    1240  239   1621492 85580 SyS_epoll_ 7c2695ab84 S com.rigol.webcontrol
root      1261  2     0      0     irq_thread 0000000000 S irq/197-fts_ts
root      1287  1     3104   612   inet_csk_a 00000857b0 S tcpsvd
root      1344  1     816    4     poll_sched 000041db48 S /rigol/tools/pmapService
root      1351  1     10200  5420  __skb_recv 7b110686dc S /system/bin/logcat
root      1410  2     0      0     rescuer_th 0000000000 S kbase_event
root      1465  2     0      0     irq_thread 0000000000 S irq/230-dwc3
shell     1521  231   7716   2544  sigsuspend 74c21f9d4c S /system/bin/sh
root      1529  1521  4744   304      do_wait 0000411078 S su
root      1530  1529  6808   140   wait_woken 0000410f70 S su
root      1533  1     4744   144      do_wait 0000411078 S /system/xbin/su
root      1535  1533  4744   152      do_wait 0000411078 S /system/xbin/su
root      1536  1535  7716   2556  sigsuspend 7da9028d4c S sh
root      1553  1536  9116   2440           0 779f52167c R ps


I guess that com.rigol.launcher (1084) and com.rigol.launcher:watchdog (1227) are somehow monitoring each other and restart the counterpart if someone terminates one of them. The first probably monitors that com.rigol.scope (1157) is running properly, casts the observed message if it isn't and tries to restart the scope app.
 

Offline Dennis Frie

  • Contributor
  • Posts: 25
  • Country: dk
Re: Hacking the HDO1k/HDO4k Rigol 12 bit scope
« Reply #648 on: December 28, 2023, 03:05:25 pm »
Here's a list of the active processes running on my DHO1074:

Code: [Select]
USER      PID   PPID  VSIZE  RSS   WCHAN              PC  NAME
root      1     0     10524  2012  SyS_epoll_ 00004ccd60 S /init
root      2     0     0      0       kthreadd 0000000000 S kthreadd
root      3     2     0      0     smpboot_th 0000000000 S ksoftirqd/0
root      4     2     0      0     worker_thr 0000000000 S kworker/0:0
root      5     2     0      0     worker_thr 0000000000 S kworker/0:0H
root      6     2     0      0     worker_thr 0000000000 S kworker/u12:0
root      7     2     0      0     rcu_gp_kth 0000000000 S rcu_preempt
root      8     2     0      0     rcu_gp_kth 0000000000 S rcu_sched
root      9     2     0      0     rcu_gp_kth 0000000000 S rcu_bh
root      10    2     0      0     smpboot_th 0000000000 S migration/0
root      11    2     0      0     smpboot_th 0000000000 S watchdog/0
root      12    2     0      0     smpboot_th 0000000000 S watchdog/1
root      13    2     0      0     smpboot_th 0000000000 S migration/1
root      14    2     0      0     smpboot_th 0000000000 S ksoftirqd/1
root      15    2     0      0     worker_thr 0000000000 S kworker/1:0
root      16    2     0      0     worker_thr 0000000000 S kworker/1:0H
root      17    2     0      0     smpboot_th 0000000000 S watchdog/2
root      18    2     0      0     smpboot_th 0000000000 S migration/2
root      19    2     0      0     smpboot_th 0000000000 S ksoftirqd/2
root      20    2     0      0     worker_thr 0000000000 S kworker/2:0
root      21    2     0      0     worker_thr 0000000000 S kworker/2:0H
root      22    2     0      0     smpboot_th 0000000000 S watchdog/3
root      23    2     0      0     smpboot_th 0000000000 S migration/3
root      24    2     0      0     smpboot_th 0000000000 S ksoftirqd/3
root      25    2     0      0     worker_thr 0000000000 S kworker/3:0
root      26    2     0      0     worker_thr 0000000000 S kworker/3:0H
root      27    2     0      0     smpboot_th 0000000000 S watchdog/4
root      28    2     0      0     smpboot_th 0000000000 S migration/4
root      29    2     0      0     smpboot_th 0000000000 S ksoftirqd/4
root      30    2     0      0     worker_thr 0000000000 S kworker/4:0
root      31    2     0      0     worker_thr 0000000000 S kworker/4:0H
root      32    2     0      0     smpboot_th 0000000000 S watchdog/5
root      33    2     0      0     smpboot_th 0000000000 S migration/5
root      34    2     0      0     smpboot_th 0000000000 S ksoftirqd/5
root      35    2     0      0     worker_thr 0000000000 S kworker/5:0
root      36    2     0      0     worker_thr 0000000000 S kworker/5:0H
root      37    2     0      0      devtmpfsd 0000000000 S kdevtmpfs
root      38    2     0      0     rescuer_th 0000000000 S netns
root      39    2     0      0     rescuer_th 0000000000 S perf
root      40    2     0      0     console_th 0000000000 S kconsole
root      41    2     0      0       watchdog 0000000000 S khungtaskd
root      42    2     0      0     rescuer_th 0000000000 S writeback
root      43    2     0      0     ksm_scan_t 0000000000 S ksmd
root      44    2     0      0     rescuer_th 0000000000 S crypto
root      45    2     0      0     rescuer_th 0000000000 S bioset
root      46    2     0      0     rescuer_th 0000000000 S kblockd
root      47    2     0      0     worker_thr 0000000000 S kworker/4:1
root      48    2     0      0     rescuer_th 0000000000 S devfreq_wq
root      49    2     0      0     rescuer_th 0000000000 S cfg80211
root      50    2     0      0     cpufreq_in 0000000000 S cfinteractive
root      51    2     0      0     worker_thr 0000000000 S kworker/u12:1
root      52    2     0      0     rescuer_th 0000000000 S rpciod
root      67    2     0      0         kswapd 0000000000 S kswapd0
root      68    2     0      0     rescuer_th 0000000000 S vmstat
root      69    2     0      0     fsnotify_m 0000000000 S fsnotify_mark
root      70    2     0      0     rescuer_th 0000000000 S nfsiod
root      71    2     0      0     rescuer_th 0000000000 S cifsiod
root      103   2     0      0     irq_thread 0000000000 S irq/225-rockchi
root      104   2     0      0     irq_thread 0000000000 S irq/226-rockchi
root      105   2     0      0     irq_thread 0000000000 S irq/227-rockchi
root      106   2     0      0     irq_thread 0000000000 S irq/228-rockchi
root      107   2     0      0     irq_thread 0000000000 S irq/229-rockchi
root      108   2     0      0     irq_thread 0000000000 S irq/46-ff670000
root      109   2     0      0     rescuer_th 0000000000 S vcodec
root      110   2     0      0     irq_thread 0000000000 S irq/42-ff650000
root      111   2     0      0     irq_thread 0000000000 S irq/41-ff650000
root      112   2     0      0     rescuer_th 0000000000 S vcodec
root      113   2     0      0     irq_thread 0000000000 S irq/44-ff660000
root      114   2     0      0     rescuer_th 0000000000 S bioset
root      115   2     0      0     rescuer_th 0000000000 S bioset
root      116   2     0      0     rescuer_th 0000000000 S bioset
root      117   2     0      0     rescuer_th 0000000000 S bioset
root      118   2     0      0     rescuer_th 0000000000 S bioset
root      119   2     0      0     rescuer_th 0000000000 S bioset
root      120   2     0      0     rescuer_th 0000000000 S bioset
root      121   2     0      0     rescuer_th 0000000000 S bioset
root      122   2     0      0     rescuer_th 0000000000 S bioset
root      123   2     0      0     rescuer_th 0000000000 S bioset
root      124   2     0      0     rescuer_th 0000000000 S bioset
root      125   2     0      0     rescuer_th 0000000000 S bioset
root      126   2     0      0     rescuer_th 0000000000 S bioset
root      127   2     0      0     rescuer_th 0000000000 S bioset
root      128   2     0      0     rescuer_th 0000000000 S bioset
root      129   2     0      0     rescuer_th 0000000000 S bioset
root      130   2     0      0     rescuer_th 0000000000 S bioset
root      131   2     0      0     rescuer_th 0000000000 S bioset
root      132   2     0      0     rescuer_th 0000000000 S bioset
root      133   2     0      0     rescuer_th 0000000000 S bioset
root      134   2     0      0     rescuer_th 0000000000 S bioset
root      135   2     0      0     rescuer_th 0000000000 S bioset
root      136   2     0      0     rescuer_th 0000000000 S bioset
root      137   2     0      0     rescuer_th 0000000000 S bioset
root      138   2     0      0     rescuer_th 0000000000 S bioset
root      139   2     0      0     rescuer_th 0000000000 S nvme
root      140   2     0      0     kthread_wo 0000000000 S spi1
root      141   2     0      0     kthread_wo 0000000000 S spi2
root      143   2     0      0     worker_thr 0000000000 S kworker/0:1
root      145   2     0      0     worker_thr 0000000000 S kworker/2:1
root      146   2     0      0     worker_thr 0000000000 S kworker/3:1
root      147   2     0      0     irq_thread 0000000000 S irq/116-rk808
root      148   2     0      0     irq_thread 0000000000 S irq/36-rockchip
root      149   2     0      0     rescuer_th 0000000000 S dm_bufio_cache
root      150   2     0      0     worker_thr 0000000000 S kworker/1:1
root      151   2     0      0     worker_thr 0000000000 S kworker/1:2
root      152   2     0      0     worker_thr 0000000000 S kworker/5:1
root      153   2     0      0     irq_thread 0000000000 S irq/27-mmc2
root      154   2     0      0     worker_thr 0000000000 S kworker/5:2
root      155   2     0      0     worker_thr 0000000000 S kworker/2:2
root      156   2     0      0     rescuer_th 0000000000 S binder
root      157   2     0      0     irq_thread 0000000000 S irq/130-rx8010
root      158   2     0      0     rescuer_th 0000000000 S ipv6_addrconf
root      159   2     0      0     wait_woken 0000000000 S krfcommd
root      161   2     0      0     irq_thread 0000000000 S irq/47-rga
root      162   2     0      0     rescuer_th 0000000000 S deferwq
root      163   2     0      0     rescuer_th 0000000000 S hpd_queue
root      164   2     0      0     irq_thread 0000000000 S irq/56-ff940000
root      165   2     0      0     worker_thr 0000000000 S kworker/5:3
root      166   2     0      0     rescuer_th 0000000000 S bioset
root      167   2     0      0     mmc_queue_ 0000000000 S mmcqd/2
root      168   2     0      0     rescuer_th 0000000000 S bioset
root      169   2     0      0     mmc_queue_ 0000000000 S mmcqd/2boot0
root      170   2     0      0     rescuer_th 0000000000 S bioset
root      171   2     0      0     mmc_queue_ 0000000000 S mmcqd/2boot1
root      172   2     0      0     rescuer_th 0000000000 S bioset
root      173   2     0      0     mmc_queue_ 0000000000 S mmcqd/2rpmb
root      174   2     0      0     rescuer_th 0000000000 S gpu_power_off_w
root      175   2     0      0     worker_thr 0000000000 S kworker/u13:0
root      176   2     0      0     worker_thr 0000000000 S kworker/u13:1
root      177   2     0      0     rescuer_th 0000000000 S kbase_job_fault
root      178   2     0      0     worker_thr 0000000000 S kworker/u12:2
root      179   2     0      0     worker_thr 0000000000 S kworker/u12:3
root      180   2     0      0     worker_thr 0000000000 S kworker/u12:4
root      181   1     5780   1064  poll_sched 00004ccd90 S /sbin/ueventd
root      182   2     0      0     worker_thr 0000000000 S kworker/3:2
root      183   2     0      0     worker_thr 0000000000 S kworker/3:3
root      185   2     0      0     worker_thr 0000000000 S kworker/5:1H
root      186   2     0      0     kjournald2 0000000000 S jbd2/mmcblk2p10
root      187   2     0      0     rescuer_th 0000000000 S ext4-rsv-conver
root      189   2     0      0     kjournald2 0000000000 S jbd2/mmcblk2p9-
root      190   2     0      0     rescuer_th 0000000000 S ext4-rsv-conver
root      194   2     0      0     kjournald2 0000000000 S jbd2/mmcblk2p11
root      195   2     0      0     rescuer_th 0000000000 S ext4-rsv-conver
root      199   2     0      0     kjournald2 0000000000 S jbd2/mmcblk2p16
root      200   2     0      0     rescuer_th 0000000000 S ext4-rsv-conver
root      202   2     0      0     kjournald2 0000000000 S jbd2/mmcblk2p15
root      203   2     0      0     rescuer_th 0000000000 S ext4-rsv-conver
logd      204   1     18924  3496  sigsuspend 789c7e3d4c S /system/bin/logd
root      209   2     0      0     kauditd_th 0000000000 S kauditd
root      213   1     5348   2312  __skb_recv 00f0eb14a8 S /system/bin/debuggerd
root      214   1     10160  2776  __skb_recv 79dab22b24 S /system/bin/debuggerd64
root      215   1     19160  5952  hrtimer_na 7903c96574 S /system/bin/vold
root      216   214   9904   672   __skb_recv 79dab2367c S debuggerd64:signaller
root      218   213   5092   532   __skb_recv 00f0eb26dc S debuggerd:signaller
root      224   1     6432   932   SyS_epoll_ 000047cc78 S /sbin/healthd
root      226   1     8932   2940  SyS_epoll_ 7d841d0b84 S /system/bin/lmkd
system    227   1     9156   2428  binder_thr 731e775c74 S /system/bin/servicemanager
system    228   1     304360 61096 SyS_epoll_ 77733deb84 S /system/bin/surfaceflinger
shell     230   1     7716   2580  wait_woken 7c4eaa367c S /system/bin/sh
shell     231   1     14272  1176  poll_sched 00004a5c90 S /sbin/adbd
root      233   1     4744   476   __skb_recv 0000410c58 S /system/xbin/su
root      237   1     7716   1796  sigsuspend 73b65f4d4c S /system/bin/sh
root      239   1     2154796 130336 poll_sched 7c2695aca4 S zygote64
root      240   1     1592648 114984 poll_sched 00f56e8734 S zygote
audioserver 241   1     27436  8960  binder_thr 00f035668c S /system/bin/audioserver
drm       242   1     13860  6448  binder_thr 00f3d8a68c S /system/bin/drmserver
root      243   1     9620   2448  unix_strea 72ccf9a67c S /system/bin/installd
keystore  244   1     12640  4620  binder_thr 7f1b124c74 S /system/bin/keystore
mediacodec 245   1     28880  8684  binder_thr 00efef668c S media.codec
media     247   1     38440  11824 binder_thr 00ec9a368c S /system/bin/mediadrmserver
mediaex   248   1     43160  9056  binder_thr 00f643968c S media.extractor
media     249   1     69388  14736 binder_thr 00f2ea568c S /system/bin/mediaserver
root      250   1     30004  4940  binder_thr 6fd19c3c74 S /system/bin/netd
root      251   1     10436  3660  poll_sched 7c73c4fcbc S /system/vendor/bin/crashlogd
root      252   1     10188  1852  devkmsg_re 6fdead167c S /vendor/bin/log-watch
system    253   1     12328  4384  binder_thr 7082e26c74 S /system/bin/gatekeeperd
root      255   237   10100  4112  poll_sched 7139d56cbc S /system/bin/sshd
root      256   1     8272   2048  hrtimer_na 7299bde574 S /system/xbin/perfprofd
root      271   1     7716   2496  sigsuspend 70cd06cd4c S /system/bin/sh
root      282   271   9096   1820  __skb_recv 747b1da6dc S /system/vendor/bin/logcatext
root      299   2     0      0     rescuer_th 0000000000 S kbase_event
root      419   2     0      0     worker_thr 0000000000 S kworker/4:1H
root      490   2     0      0     xthread_ma 0000000000 S cmpl_status_th0
root      491   2     0      0     xthread_ma 0000000000 S cmpl_status_th1
root      492   2     0      0     xthread_ma 0000000000 S cmpl_status_th2
root      493   2     0      0     xthread_ma 0000000000 S cmpl_status_th3
root      494   2     0      0     xthread_ma 0000000000 S cmpl_status_th4
root      495   2     0      0     xthread_ma 0000000000 S cmpl_status_th5
root      496   2     0      0     xthread_ma 0000000000 S cmpl_status_th6
root      497   2     0      0     xthread_ma 0000000000 S cmpl_status_th7
system    528   239   2190916 200696 SyS_epoll_ 7c2695ab84 S system_server
root      588   2     0      0              0 0000000000 S kworker/u13:2
root      642   2     0      0     worker_thr 0000000000 S kworker/2:1H
root      664   2     0      0     worker_thr 0000000000 S kworker/1:1H
root      687   2     0      0     rescuer_th 0000000000 S kbase_event
u0_a15    704   239   1792000 154428 SyS_epoll_ 7c2695ab84 S com.android.systemui
system    716   239   1777396 110100 SyS_epoll_ 7c2695ab84 S com.android.settings
root      766   2     0      0     rescuer_th 0000000000 S kbase_event
media_rw  789   215   13872  3440  wait_woken 721cb9d67c S /system/bin/sdcard
root      806   2     0      0     worker_thr 0000000000 S kworker/0:2
root      809   2     0      0     worker_thr 0000000000 S kworker/4:2
root      996   2     0      0     rescuer_th 0000000000 S kbase_event
u0_a5     1007  239   1572436 72908 SyS_epoll_ 7c2695ab84 S android.ext.services
root      1023  2     0      0     worker_thr 0000000000 S kworker/0:1H
system    1053  239   1575108 79708 SyS_epoll_ 7c2695ab84 S android.rockchip.update.service
system    1069  239   1573552 73132 SyS_epoll_ 7c2695ab84 S com.android.keychain
system    1084  239   1757788 113528 SyS_epoll_ 7c2695ab84 S com.rigol.launcher
u0_a4     1113  239   1583724 93024 SyS_epoll_ 7c2695ab84 S android.process.media
root      1116  2     0      0     worker_thr 0000000000 S kworker/3:1H
u0_a27    1131  239   1575552 76140 SyS_epoll_ 7c2695ab84 S com.android.printspooler
system    1157  239   3294924 322592 SyS_epoll_ 7c2695ab84 S com.rigol.scope
u0_a7     1193  239   1573672 73564 SyS_epoll_ 7c2695ab84 S com.android.managedprovisioning
root      1214  2     0      0     rescuer_th 0000000000 S fts_wq
root      1217  2     0      0     rescuer_th 0000000000 S kbase_event
system    1227  239   1594296 97104 SyS_epoll_ 7c2695ab84 S com.rigol.launcher:Watchdog
system    1240  239   1621492 85580 SyS_epoll_ 7c2695ab84 S com.rigol.webcontrol
root      1261  2     0      0     irq_thread 0000000000 S irq/197-fts_ts
root      1287  1     3104   612   inet_csk_a 00000857b0 S tcpsvd
root      1344  1     816    4     poll_sched 000041db48 S /rigol/tools/pmapService
root      1351  1     10200  5420  __skb_recv 7b110686dc S /system/bin/logcat
root      1410  2     0      0     rescuer_th 0000000000 S kbase_event
root      1465  2     0      0     irq_thread 0000000000 S irq/230-dwc3
shell     1521  231   7716   2544  sigsuspend 74c21f9d4c S /system/bin/sh
root      1529  1521  4744   304      do_wait 0000411078 S su
root      1530  1529  6808   140   wait_woken 0000410f70 S su
root      1533  1     4744   144      do_wait 0000411078 S /system/xbin/su
root      1535  1533  4744   152      do_wait 0000411078 S /system/xbin/su
root      1536  1535  7716   2556  sigsuspend 7da9028d4c S sh
root      1553  1536  9116   2440           0 779f52167c R ps


I guess that com.rigol.launcher (1084) and com.rigol.launcher:watchdog (1227) are somehow monitoring each other and restart the counterpart if someone terminates one of them. The first probably monitors that com.rigol.scope (1157) is running properly, casts the observed message if it isn't and tries to restart the scope app.

Yeah I've tried to kill the "com.rigol.scope" process. The watchdog starts it up again after a little while. However, it gives enough time to start the new apk, just to see if the already running apk was causing the problem. Unfortunatly, that didn't seem to be the issue.
 

Offline Dennis Frie

  • Contributor
  • Posts: 25
  • Country: dk
Re: Hacking the HDO1k/HDO4k Rigol 12 bit scope
« Reply #649 on: December 28, 2023, 03:06:49 pm »
While testing code changes, I feel more comfortable using a modified APK in parallel, just in case I do something stupid  ;). However, I keep getting the error  "RIGOL.SCOPE has stopped" when trying to launch the modified version.
I've decompiled the Auklet.apk using apktool, changed the Manifest as needed, recompiled, resigned and installed the new APK. I've tried to kill the Scope process before starting the new APK, but I keep getting the same error.

Any good ideas what might be causing this issue?

I have not really managed to run the patched APK without the issues - that is why ended up patching odex files instead :)
With patched odex files btw, you can always reinstall the original apk effectively reverting the patches.

The problem as far as I understand is mostly about the permissions of the user running a separately installed app - the original app uses shared user with system permissions, but the one installed separately by default - does not (I saw some errors in logs while trying about it not having access to some files).

As an option for fixing it - you can try installing it in "/system/priv-app". However, that is likely to require more fixes, at least - renamed providers are likely to require more changes in code using them.

Thanks for your input. I will poke around a bit more and see. A good hint with the permissions. I've tried to install with -g to see if there's any difference, but same issue.
« Last Edit: December 28, 2023, 03:24:20 pm by Dennis Frie »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf