well i'm getting a little too tired to reach completion with this approach
my state of mind will change when i sleep. i have something else to do tomorrow.
i'll just run the app on my phone at this point !
there are possible permissions to add
https://mind-monitor.com/forums/viewtopic.php?t=1759
basic decompilation:
$ jadx/build/jadx/bin/jadx --export-gradle --output-dir
com.sonicPenguins.museMonitor-jadx com.sonicPenguins.museMonitor.apk
it makes a gradle project. haven't gotten to the point of testing it
quite, but it's expected to fail.
however:
- jadx supports reducing the
maybe I could put the .java next to the .smali and use a makefile rule
to convert them with something like
https://github.com/izgzhen/java2smali
the decompiler finds 3 errors in decompilation
so it makes sense to frankenstein it
which is a little frustrating but is likely better than nothing.
i guess the reason to do this avenue is because it's psychologically
easier O_O . i've tried to build mobile apps on my own so many times,
i never
apparently with flatpak jadx is run with:
flatpak run com.github.skylot.jadx
and it then runs the gui rather than the cli. more investigation could
yield results.
in the gui, jadx does indeed load .smali files, which opens options
my immediate goal is to simply use it.
network storage of the data would make this easier.
goals:
- handle dropped packets
goals:
- run all the time as a service
- notify the user when there is a disconnection. subgoal: delayed log
if user does not respond
- provide for additional storage modes, such as: external storage, lab
streaming layer
blurgh it looks like most of the functionality is wrapped into a huge
MainActivity class
i'll spend time getting to know the sources a little while i wait for
jadx to download.
i looked a little at jadx's usage but it was hard for me to attend to it
i'm thinking maybe a good build flow, if it works, could be:
- reassemble split apks into single apk
- decompile single apk
- patch decompilation
- recompile
this isn't what i'd planned for, as using decompilation for the whole
apk means there can be more issues. we'll see maybe. but the .smali
flatpak uses a unicode-style [x] checkbox: [✗]
i set up flatpak and flathub and am installing jadx with them
$ git show-ref refs/heads/main
4d59c6fe50c18d5c474449e09b36b1ef2452d0db refs/heads/main
$ git remote -v
origin https://github.com/xloem/knockoffmonitor (fetch)
origin https://github.com/xloem/knockoffmonitor (push)
ehh maybe i don't know what firebase is
maybe i'll just leave it for now
focus on decompiling to try to make it easy to add features etc
it totally runs :D boots up just like the original
uhhh i guess maybe i should turn off firebase
i've applied the changes to the merged apk folder and am trying out
building them with the same makefile
here is another: https://github.com/charles2gan/GDA-android-reversing-Tool/
this tool decompiles to .java source: https://github.com/skylot/jadx
due to an error in my script, i am rerunning the whole process
i had not set the output name, and it crashed and cleaned up its
temporary folder
it crashed during its objection patching.
objection looks pretty cool, but i'm working on a different task than
spying on my own phone atm.
i've made a script that uses nickbloor's script to just download and
merge the apks, and i'm running it
i went to find food. i took a coldish shower too. i haven't been
logging them as much, which is only okay if it doesn't reduce doing
them.
$ ../patch-apk/patch-apk.py com.sonicPenguins.museMonitor
Getting APK path(s) for package: com.sonicPenguins.museMonitor
[+] APK path:
$ sudo apt-get install zipalign
$ pip3 install objection
I'm at https://nickbloor.co.uk/2020/03/29/patching-android-split-apks/
with helpful resources.
$ adb shell pm path com.sonicPenguins.museMonitor
package:/data/app/~~hFsc1hfbUBCc0rQkjlGORg==/com.sonicPenguins.museMonitor-TQIijxE__-nBT-63RHC63A==/base.apk
split apks can be installed with split apk installer
at https://github.com/iBotPeaches/Apktool/issues/2283 somebody said
they made a tool to automate the needed steps to make a monolithic
apk. the link was redacted.
apktool can take a -r parameter to not decompile resources
this ticket looks helpful.
https://github.com/iBotPeaches/Apktool/issues/2344
- do a diff of the apk contents after unzipping them
- install the other apks, they can contain missing resources
com.sonicPenguins.museMonitor-TQIijxE__-nBT-63RHC63A==/base$ grep -r
APKTOOL_DUMMY | wc -l
223
a lot of them
08-07 16:03:34.297 13414 13414 E AndroidRuntime:at
com.sonicPenguins.museMonitor.MainActivity.onCreate(MainActivity.java:790)
08-07 16:03:34.298 13414 13414 E AndroidRuntime: Caused by:
android.content.res.Resources$NotFoundException: Drawable
08-07 16:03:34.297 13414 13414 E AndroidRuntime: Caused by:
android.view.InflateException: Binary XML file line #6 in
com.github.xloem.knockoffmonitor:layout/graph: Error inflating class
android.widget.ImageButton
looks like it's actually for now just having trouble working with its
UI resources
$ adb logcat | grep onitor
...
08-07 16:03:33.907 1291 1369 I ActivityTaskManager: START u0
{act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER]
flg=0x1000 pkg=com.github.xloem.knockoffmonitor
cmp=com.github.xloem.knockoffmonitor/com.sonicPenguins.museMonitor.MainActivity}
I have an app called "Knockoff Monitor" now :)
when I boot it up, it shows james' logo, then crashes.
there are two apps on the device with the same name
better change it so i can tell them apart
it installs now. i don't imagine it will run since it doesn't have the
dependencies from the other apks.
$ cd ..
user@archival:~/src/musemonitor$ make
apktool build "com.sonicPenguins.museMonitor-TQIijxE__-nBT-63RHC63A==/base"
I: Using Apktool 2.6.1
I: Checking whether sources has changed...
I:
$ adb install
com.sonicPenguins.museMonitor-TQIijxE__-nBT-63RHC63A\=\=/base/dist/base.apk
adb: failed to install
com.sonicPenguins.museMonitor-TQIijxE__-nBT-63RHC63A==/base/dist/base.apk:
Failure [INSTALL_FAILED_CONFLICTING_PROVIDER: Scanning Failed.: Can't
install because provider name
i've built a binary using the makefile, then tried updating the
provider name, it's rebuilding
i added an install target to the makefile and fixed an issue i saw
i've rebased again, and i've got signing in the makefile, on git
should figure out how to update that provider name
looks like ipfs cut the filenames to a maximum. lots of renames.
meanwhile, i can look up making batch signing work
added an rm -rf base in there
$ git rm -r base
$ apktool d base.apk
$ git add base # todo when the previous commands complete
some of the files are still wrong :S
i'd better re-extract it
when i downloaded with wget --mirror, it left index.html files that
break building.
i have removed them.
i am rebasing all the commits so as to put the removal prior to the
changes, so that a patch can be formed easily from the git history
later.
i've commited a build script and am adding signing to it.
i want to look up how to sign without prompting the user.
oh it finished
a lot of the data is just google libraries.
waiting for these to download.
i guess i should keep patching my untracked sources while i wait.
i'm redownloading locally the expanded sources from ipfs.
i made https://github.com/xloem/knockoffmonitor using github's
commandline tool. it is sad, the github problem. similar to gmail.
Description
A bootleg mutation of Mind Monitor with an idea around fixing bugs or
adding features.
no files
next issue:
$ adb install base.apk
adb: failed to install base.apk: Failure
[INSTALL_FAILED_CONFLICTING_PROVIDER: Scanning Failed.: Can't install
because provider name museMonitor.provider (in package
com.github.xloem.knockoffmonitor) is already used by
com.sonicPenguins.museMonitor]
i'd like to
i change the package name to something like com.github.xloem.knockoffMonitor
i didn't change the java package names, just the manifest one
gotta resign i imagine
ok, progress.
i gave it a self-signed certificate; i'll want to save that in a
script, maybe in a bit.
next issue:
$ adb install base.apk
adb: failed to install base.apk: Failure
[INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package
com.sonicPenguins.museMonitor signatures do not match previously
i'm imagining a big slow arctic mammal, but i may have it wrong, i
don't really know.
loading an arctic mammal list to glance through
i'm looking for a name other than 'penguins' to associate with my hack
i don't know whether the concept of being "very very cold" implies for
certain that you are being abused by govcorp, but i might as well keep
it around
$ adb install base/dist/base.apk
adb: failed to install base/dist/base.apk: Failure
[INSTALL_PARSE_FAILED_NO_CERTIFICATES: Failed collecting certificates
for /data/app/vmdl406395370.tmp/base.apk: Failed to collect
certificates from /data/app/vmdl406395370.tmp/base.apk: Attempt to get
length of
the new apk is 2109569 bytes; the old was 2087030
split_config.armeabi_v7a appears to contain Muse's proprietary library.
it's possible this could be upgraded to a newer version either from
their site or extracted from their official app
the separation of concerns may mean that de/recompiling the main app
may be more reasonable than otherwise
i have "apktool build base" running to see if i can relink the
application. this may take some learning.
smali is android assembly code. so it is a language that can be written in.
the apktool help links to https://github.com/JesusFreke/smali which i
have opened
disconnected phone
if you disconnect your devices when not using them, it pressures your
government to build spy AIs that can seamlessly transfiltrate data
across the connection gaps
eventually this technology may trickle down to you, especially as
confused hackers try to comprehend it
i ran the apks through "apktool d"
there are 4 apks, a base apk, an armeabi_v7a split_config apk that is
twice as big as base (a little more than twice), and split_config apks
for en, es, and hdpi.
apktool docs are at https://ibotpeaches.github.io/Apktool/documentation/
there are apk files in the folder with the funny characters at the end
the goal is to try to decompile them, and repack them into a new app
it ended up making 3 trees. some same-named folders may have clobbered
each other.
they're at
https://dweb.link/ipfs/bafybeidtsuxhndsgfluyvau3bai32xi2bpr4n43ltthzg3sle6xg4cszpa
here's the folder list i pasted in:
./config/sdcardfs/com.sonicPenguins.museMonitor
i'm basically doing this but with copypaste instead of the first pipe:
adb shell find / -name '*sonicPenguins*' 2>/dev/null | dos2unix |
while read folder; do adb pull "$folder"; done
o the M is capitalised in the app name.
com.sonicPenguins.museMonitor-TQIijxE__-nBT-63RHC63A==
the find on the phone's shell didn't yield any obvious hits
for a in /data/app/*/*; do basename "$a"; done
I'm guessing these are my installed apps, not certain. I recognise
apps I recently installed in the output folder names.
ok, so it's obviously going to want an apk [i'm guessing].
i'll want an apk for the app in question.
i wonder if android caches those or stores them expanded or reencoded
somehow? or if i need to download it from a store or repack it?
https://ibotpeaches.github.io/Apktool/install/
$ apktool
Apktool v2.6.1 - a tool for reengineering Android apk files
with smali v2.5.2 and baksmali v2.5.2
Copyright 2010 Ryszard Wiśniewski
Copyright 2010 Connor Tumbleson
usage: apktool
-advance,--advanced prints advance information.
it looks like the way this is done nowadays is
https://ibotpeaches.github.io/Apktool
at least, that's what websearching implies quickly
i think that was true for both google android and adobe flash, but
maybe i am crossing wires for one of them
i remember google used to include an apk decompiler _in their source tree_.
i guess that's likely still the case.
as time went by they required more and more dev setup in order to do
its default build.
i'm trying a "find -name '*monitor*'" to see if i can find the app
but i don't really know the android app layout. it would make sense to
find some disassembly software and see what format they expect.
i found another cable in my pack of misplaced confusions (a grey bag i
carry around that i just named to write this; basically i never look
in it, dissociation). the kernel detects the phone now.
no go.
i bet the cable i'm using is charging-only and doesn't carry data.
when i replug the phone i don't see anything on dmesg O_O
it charges it though
the system has a few usb expansion cards; i'll try them
here they are for fun:
[1449929.928040] git[2039640]: segfault at 0 ip 7f3d1d48abea sp
7fff3f8eee18 error 4 in libc-2.31.so[7f3d1d3fb000+178000]
[1449929.928049] Code: f3 0f 1e fa 66 0f ef c0 66 0f ef c9 66 0f ef d2
66 0f ef db 48 89 f8 48 89 f9 48 81 e1 ff 0f 00 00 48 81 f9 cf 0f 00
00
woahhh my dmesg is full of segfaults in libc called by git.
get them same error when i run the daemon as root.
time for dmesg! maybe even udev!
:/
$ adb ls /
* daemon not running; starting now at tcp:5037
* daemon started successfully
adb: error: failed to get feature set: no devices/emulators found
$ apt-get download adb android-libadb android-libboringssl
android-libcrypto-utils android-sdk-platform-tools-common
$ sudo dpkg -i *.deb
I thought apt-get would install it if I specified it manually but it
seems easier to just be totally manual here.
looks like my system has a partial install it wants to resolve, and
needs me to specify my dependency tree manually if i'm going to keep
it unresolved.
the packages for adb on ubuntu are:
adb
android-libadb
android-libboringssl
android-libcrypto-utils
android-sdk-platform-tools-common
my package installer for adb wants to upgrade my graphics drivers.
i recall i didn't fully stabilise my gpu situation, and i'm worried
the desktop where i'm writing this may not function if i upgrade them
without considering it. i'd rather not consider it atm.
i think gfx drivers are pretty
when he made his app i was like 'why is this the only app'
well back then it was probably because the usa was under attack,
information warfare
but nowadays it is because the muse company pulled all their sdk resources
because EEG is so ridiculous :S
the similarity of james' name to 'clusterfuck' seems poignant now
the app is called "mind monitor" by james clutterbuck or somesuch
i bought it years ago and would have been happy to pay for a more
advanced version, or for access to the source to contribute bug fixes,
or for the bugs to be fixed. our economy isn't really set up for such
things.
```
apt install adb
```
i think last time i got the app off a bootleg play store or something,
to disassemble. that time i had disassembled the official muse app, to
get the latest protocol, not this recorder app.
since the app is for purchase, and my phone is rooted now, i guess
i'll get it off my phone. i don't like connecting phones and online
computers together, expecting them to exchange malware over the cable
when i do, but i'll do it here.
the plan is to disassemble muse monitor and add storage modes and
basically make an effective fork. it's expected to not be complex
because it simply links to a muse library.
it's rude because the author is an accessible community member who
expresses a need for income.
they have small bugs in
well i dunno. i'm thinking i'll explore the RE a little.
[bluetooth]# list
Controller [gently censored mac and host] [default]
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# scan on
Failed to start discovery: org.bluez.Error.NotReady
at https://support.apple.com/kb/sp652 it looks likely the system
supports bluetooth 2.1, which i'm thinking is non-ble.
i managed to figure out to type "bluetoothctl" at the command line,
using tab completion guessing around 'bluez' with 'blu'[tab] . i
recognise this interface. i'll see if it can
if there is no ble support in this system, then the plan is instead to
disassemble an existing android-based application and patch in
functions or avenues to robustly record, if possible.
i'm installing anaconda since it is the distribution system that
appears most supported by liblsl, and i don't see any more normative
information on integrating liblsl with ubuntu. i'm hoping conda has a
faint chance of automatically updating, or notifying if something is
out of date :S
i still
looks like 2012 was around the edge of when ble happened.
i figured i'd use muse-lsl to see if the system had bluetooth.
it's a high-end system from 2012 or so i think. so it likely has
bluetooth, if there was bluetooth in 2012.
the muse uses bluetooth LE ("low energy" or "gatt") which is basically
completely different from the bluetooth prior and just
this is probably not an issue for most because the system is so very small.
for me refactoring is very hard, haven't fought the inhibitions, big
reason for codefudge
I have some sadness around using muse-lsl, because like many modern
research systems i bump into, it is not designed in a general way
making it laborious to add more recording modes. The muse can provide
data in a greater detail than the app engages it by default, but I'm
not sure whether the app
muse-lsl is at https://github.com/alexandrebarachant/muse-lsl
it's an open source project that moves slowly when the maintainer and
contributors have time. this makes it hard for me to contribute a lot
during bursts of productivity, since the maintainer might be away for
weeks. this is a normal
I guess it would be nice to buy an openbci too. Something to help me
use to repair my existing ones, and something to actually use, maybe
the cheapest things.
It would also be nice to buy an openeeg.
I don't know how much savings I have to splurge. I don't understand
why I have money to spend.
Yay muse!
Muse is fun cause I looked into the protocol and second time and
retain a little ;p
The new Muse S's are also more comfortable, resulting in fewer
psychoticish internal complaints.
I'm connected with at least 3 projects around this: a software called
brainflow, a short thing of my
100 matches
Mail list logo