yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] quindel:
I tried this, and it still crashes after the list is closed. THe list of files or playlist shows up, and you can select as usual, but upon close, it crashes going back.

You wrote: I'd just assumed "sources\p003de\stohelit" already contained Mortplayer's java-code, and the "android" and "com" folders to be decompiled libraries.

Where did you see that? I used AllinOne Cleaner to extract the apk, and I dont have a sources directory in the apk. I have META-INF, res, AndroidManifest.xml, classes.dex, and resources.arsc.

The classes.dex is a compressed Java Jar file, which you can do a dextojar to get the jar file, but then you run a normal decompiler like JAD, to extract the classes to Java from there, but it does a terrible job, SO, I cannot do a thing with it.
[Android Apps and Games] UltraTheHedgeToaster:
How unfortunate. :(

At the moment it still works, and has continuously since ~22 hours ago when I performed the "split screen trick". I admit I'm not too keen on deliberately breaking it to test how to get it work again, but I'll keep you posted in case I discover any other factors at play. Of course, since who-knows-what is happening under the hood, this might only work on my phone by magical chance and not yours, impossible to tell for now. :rolleyes:

I used this online decompiler: http://javadecompilers.com/apk

I had linked it in my first post, I had assumed that's what you used. ^_^;;

Just to be sure we're on the same page, here's a mirror of the files I got: http://www.mediafire.com/file/nz0ul...om_source_from_JADX_%5BDECOMPILED%5D.zip/file
[Android Apps and Games] quindel:
Thank you. I'll compare that to the other decompiles I had tried. Maybe this one I may be able to get to work in a workspace in android studio, that I can recompile. We'll see.

I want to try to fix mortplayer, Besides mx player pro, I have not found a good player I like. My own apk works with both. I keep my main bookmarks in my program, but use my player as well as mort and mx player pro. I've been finding that since I moved my files to the sdcard, I mainly use mx player pro and my own more than I do mort. I had to create something I can bookmak long podcasts, as well as turn off the video on mp4s so I can still listen to them as I drive.

I'll go back to look how you are splitscreening mort so I can see if I can do intents better to it. my program sends intents back and forth between it, and mx player pro, and mort.
[Android Apps and Games] Eggstones:
Alas this didn't work for me. It looked like it worked but at the second attempt it crashed

Currently using musicolet which isn't as good but it does what I want it to do.
[Android Apps and Games] UltraTheHedgeToaster:
...Well, about an hour after I made my last post the app apparently unloaded and restarted, which canceled the effect.

Then I tried the same thing I did before... aaaaand it didn't work. :rolleyes:

I'm not going to call this a fluke. I got it to work twice, somehow. And I think it may have already been working before that, I just hadn't realized it since I had so much gotten used to navigating with "next/previous" buttons rather than the actual list, but remember being mildly confused a couple of times thinking "shouldn't it have crashed?" but wasn't paying too much attention at the time.

I've only recently started using split screen while using Mortplayer, and that was what I was doing when I got it to work the second time, directly following a hunch that the split screen might've been what caused it to work. So I'll assume there is some more nuance to this, it's worth some experimenting to see if I can reproduce it more reliably.
[Android Apps and Games] quindel:
musicolet? I have not heard of this one. I will see if it is a good mort replacement for my app.

Been looking for a good one as a replacement, until I get mort fixed.

Thanks.
[Android Apps and Games] quindel:
According to Android studio 3.3

I had to modify arrays.xml to <item>Dont shuffle</item>

Running Analyze Inspect code, the results I get are:

Android 1241 errors

Manifest 730 weak warnings

Properties 1109 warnings

Spelling 40347 typos

xml 3817 errors 201 warnings.

Make project is getting this error:

Execution failed for task ':app:mergeDebugResources'.

> java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource compilation failed

error: found an invalid color.

So, it may take some time. I don't know whether it pays to try Android 4 which came out. I figured since the project is old, an older version may be better - besides that I did not want to convert my current projects.
[Android Apps and Games] quindel:
How did you make the changes, using apktool, using studio?
[Android Apps and Games] crazyfury:
1 apktool

2 dex2jar

3 gd-gui

4 in Studio (create simplest example app)

5 in Studio created simplified MainPlayer class with the same package structure that Mort's MainPlayer (if your work takes place in this file) class has.

6 in Studio copy decompiled Java code of original errorReport() method obtained from gd-gui. Make it compile with some stub methods. Than modify the code and compile again.

7 apktool to convert the simplest example app to smali

8 replace smali code of original errorReport() method with smali code from simplest example app's errorReport()

9 while replacing watch the part of the smali code for which you had to create stub methods. So that the real methods are called.

10 apktool to reassemble MortPlayer
[Android Apps and Games] quindel:
I have those. I will give it a try. Thank you.

I just ran apktool and made the changes using your diff. I then got it back together, but it is giving me an error on install - app not installed. So I will need to recheck it again to see what messed up.

I did a recheck. Your smali code diff, does not match up with the java code. After making the changes, I did a dex2jar to relook at the generated java, and it is incorrect. I'd jave to study the smali code to see how to tweak it myself.

This was one of the issues I wanted to correct. I also want to tweak the delete code to be able to delete files from the sdcard, since file.delete() does not work on sdcards.

Thanks.

Peter
[Android Apps and Games] crazyfury:
you need to sign the app with jarsigner and your custom signature and uninstall the original beforehand as the signature changed of course.
[Android Apps and Games] Eggstones:
What does this mean for us that don't know how to programme?
[Android Apps and Games] crazyfury:
I really don't know. Maybe if [MENTION=231089]Mort[/MENTION] is willing to allow us that we can redistribute 'fixed' versions of Mort Player Audio Books. We could probably release this changes on github. But without his permissions I think it is not the right thing to do.
[Android Apps and Games] Eggstones:
And he doesn't seem to be contactable.
[Android Apps and Games] quindel:
[MENTION=10086692]crazyfury[/MENTION]

Can you by chance post just the errorreport() smali method you had used - instead of the diff?

Thank you.
[Android Apps and Games] crazyfury:
Yes, I will post this method later today.
[Android Apps and Games] quindel:
I am just playing with the diff. Also I had started a project as a sub so I can follow your direction, so I can take a look at the delete file from sdcard.
[Android Apps and Games] Greenjackp:
Bookmark Export

First off, I love this player!

I'm having a small technical issue w exporting bookmarks. I export it, it says it was successful, but when I go to import it back in, there's no file to choose. Double checked where it was saved and everything.
[Android Apps and Games] quindel:
exporting bookmarks

Make sure you choose to save it to internal memory on the phone or tablet. Mortplayer does not save to the sdcard since the Android OS upgrade.
[Android Apps and Games] Greenjackp:
Bookmark Export

Worked flawlessly, thanks!
[Android Apps and Games] jnshk:
On a related topic, I don't suppose there is any way to get MortPlayer to read files from a USB OTG source without rooting the device and allowing access to external storage? I recently picked up an Android based car stereo for which MortPlayer would be perfect, but it can only access the internal storage. (I can find the external storage in the file system, but when you click to add the folder it simply fails without any message.)

Is there any sort of app that can create a symbolic link to the external mounted USB so that MortPlayer could access it in read-only mode?
[Android Apps and Games] quindel:
USB OTG source

Actually Mort does read internal and external sources. I have it read my SDCard. It reads it fine. However, some of us fans needed to modify our local version to be able to write and delete from the card. The app is no longer supported and we don't have the source. So we're just trying to make it work for us. Personally, I wrote my own app which works with MX PLayer and MortPlayer. But over the last year or so, I've been debating to remove Mortplayer calls from my app. MX Player works fine if you have a way to call their API to do the things you want - like turning off the video on MP4....
[Android Apps and Games] jnshk:
Yes, I think that I can have it read from the removable SD card media, however it has issues reading consistently from OTG media (USB thumb drive). Apparently the method that my device uses to mount an OTG volume is different than how it mounts a more traditional SD volume. It does not mount the directories in the usual emulated storage location. This creates an issue not only with MortPlayer, but also a number of other music managing apps.

Can you give me any more details on how you modified your local version? It may possibly provide the key to giving MortPlayer access to root folders (and thereby, the mount directories for the OTG USB devices).
[Android Apps and Games] quindel:
Too many details to write, but if you look a few pages back on this discussion, you can see what we were doing to figure out what you need to do. We had a crash we were trying to solve, along with the sdcard writing. Android stuff in the newer versions. Yours may be as simple as finding a android decompiler and adding permissions to AndroidManifest.xml and then putting it back up.

We've tried to contact Mort, the author to get permission to do stuff, but he has not responded yet. We dont have access to source, so it is very risky to modify much.
[Android Apps and Games] UltraTheHedgeToaster:
Can you, for now, at least share your fixed .apk file with us? :unsure:

...I really gotta look into Android Studio sometime. (If I finally have time again sometime in a few months or so. -___-#)

I believe I've mentioned before that "it's been a while since I've done anything with Android"?

I was still using Eclipse. ^_^;;

...and then my Eclipse/Android plugin broke because I mindlessly accepted an update that one time. -___-#
[Android Apps and Games] quindel:
We've tried to contact Mort, the author to get permission to do stuff, and no response. So, we're not allowed officially to post anything without his approval since it is his application. Mort needs to post in this forum or message me or /crazyfury with approval, so we're allowed. Otherwise as a developer, we have to honor the developer code of ethics. Sorry.

Before mortplayer stopped working, I actually started writing my own to help me. It calls MX PLAYER PRO, and mortplayer so I can swap back and forth, and when mort stopped working, I debated to only use MX PLAYER PRO.

Without writing one, I'd suggest using a good podcast receiver, like Podcast Addict, and MX PLAYER PRO to play it. I find the combo works great. Both have great support, and work with fans. PodCast Addict has a ok player, but I find MX PLAYER PRO is much better. the ad version would work fine also, if you dont want to play for it. But I paid for both to support the developers. So the best work workaround for Mort is MX PLAYER in my opinion. It has bookmarking, and play in background, etc. The only reason why I coded a program for it, was so that I can play a mp4 in the car and turn off mx player video.
[Android Apps and Games] sfrye666:
Did anyone try to contact Mirko through his old webpage at http://sto-helit.de/ ?
[Android Apps and Games] quindel:
Yes. I tried the website, email, and xda messaging. I have not tried by twitter where he posts, as I don't post there. So far two of us, made a local change to our local apk files, and have successfully made a working version. But as a user, we don't have his permission to post any thing...

Personally, I created my own podcast bookmarking app. it works with MX Player Pro (which is a paid video player), and Mort. It creates a playlist and sends it to both.
[Android Apps and Games] crazyfury:
It's a pity that he won't reply at all and I do not understand why thats the case! He is still active here on xda - At least while I was writing him.
[Android Apps and Games] quindel:
I did try to write him here also, but not response.

On my local version, I had to make the two discussed changes. One to stop the crash with the try catch, which you helped with, and the code needed to write to sd card.

SInce then, It's been pretty good. There are other issues I have with it, such as the database does not get updated to match the meta tags, or, deleting the file in the folder does not delete the file if the file is part of the playlist. You have to delete the file in the playlist and then remove it from the playlist, in order to delete the file itself. But it really does not pay to fix these two issues.
[Android Apps and Games] pren0x:
Hello All,

I love the mort player audiobooks too. But it is getting more bugs with every version of Android.

I have found another player, which suites me good. It is called Voice und you can find it on fdroid.

Hope this helps someone.
[Android Apps and Games] schnurzelat:
Tutorial for patching:

Tools needed: java jre, patched MainPlayer.smali (patch done by crazyfury) and the original MortPlayer Audio Books 1.0.1.apk

apktool https://github.com/iBotPeaches/Apktool/releases/tag/v2.4.0

uber-apk-signer https://github.com/patrickfav/uber-apk-signer/releases

Put all the files in the same work folder e. g. D:\MortPlayer

1. Open a command prompt, cd to the work folder and execute: java -jar apktool_2.4.0.jar d -r "MortPlayer Audio Books 1.0.1.apk" to extract the apk

2. Replace the MainPlayer.smali in the folder d:\MortPlayer\MortPlayer Audio Books 1.0.1\smali\de\stohelit\audiobookplayer\ with the patched one

3. Execute: java -jar apktool_2.4.0.jar b "MortPlayer Audio Books 1.0.1" to rebuild the apk

4. Execute: java -jar uber-apk-signer-1.2.1.jar --apks "MortPlayer Audio Books 1.0.1\dist\MortPlayer Audio Books 1.0.1.apk" to sign the apk

5. Uninstall the old MortPlayer Audio Books

6. Install the new "D:\MortPlayer\MortPlayer Audio Books 1.0.1\dist\MortPlayer Audio Books 1.0.1-aligned-debugSigned.apk"

If you have PlayProtect enabled, there are some warnings you need to ignore.

I tried it on Android 7 and 9 and it works for me - I had to use apktool 2.4.0 to rebuild the apk - rebuilds with version 2.6.0 keeps crashing
[Android Apps and Games] tk-ham:
Great and easy tutorial - thanks! It works fine on my Android 8 phone. Is there any chance to fix the problem with the SD card permissions under Android 10? The SD directory /mnt/GUID_XXXX is just not listed on my Android 10 phones...
[Android Apps and Games] BrokenStones:
Hello schnurzelat,

Exellent tutorial, Mortplayer Audiobooks doesn't crash now.

Android 12 has broken play and pause from the notification drawer on the lock screen.

Android 12 has broken input from bluetooth headsets - play / pause / forward, number of presses of bluetooth buttons to get thise behaviours has no effect.

I think these two might be common as this behaviour is replicated accross several apps including Mortplayer audio.

The above works fine in VLC, and was fixed in Spotify. It broke it in the MX player in the same fasion.

It is great to have mortplayer audiobook not crashing, thanks.

Could you fix this? Or suggest a work around?

I have tried, the only partial workaround is to set the app to own the lockscreen with the controls in a drawer, but that doesn't fix the bluetooth play pause issue.

Hope you can help.

Thanks.
[Android Apps and Games] Mike Stark Two:
I notice that this thread is referring to 'MortPlayer Audio Books'. I have a version that is simply named ' MortPlayer' and is being listed as a music player. Are they the same?
[Android Apps and Games] johny.mnemonic:
No
[Android Apps and Games] Mike Stark Two:
Ah, that makes the app and it's operation as clear as mud (to ME). I've been trying to get the music version to work on phones, and so far I've sussed out that it won't work properly with Android 6.0 or higher.
[Android Apps and Games] SigmundDroid:
Oops, then I must have done something wrong: Still listening with Mort to my music on LOS20/A13.

Just in some versions in between I had some issues accessing music on SD card due to rights/restrictions.

Do you have some example/feature I should try out?
[Android Apps and Games] Mike Stark Two:
Well, I can't think of any examples, but it appears in my case that it doesn't want to work on Android 7 or higher, but I haven't tried it with a version higher than 8. I was able to get a Sony Xperia with Android 5 and it works smoothly, so I'm satisfied with that for now.
[Android Apps and Games] el_ruwen:
Hi!

I just reinstalled my phone and I forgot to backup both the mort player and the audio book version. Google play doesn't have the app anymore. Is there an legit place where I can still get it?

Nevermind, I went through all my external hard drives and found on one of them an oandbackup folder with those apks in them :D
[Android Apps and Games] schnurzelat:
I recently got a new device with Android 13 and run into the same problem. My solution:

- Set the folder in your old android device (in my case Android 9), with the sdcard inserted, that you want to use in your new device.

- Backup MortPlayer on the old device, with the sdcard path configured

- Restore your Backup on your new device and voila!

I used Helium Backup from Clockworkmod (no root needed). Btw: unbelievable that an Android 2.3 Backup Software from 2013 still works on Android 13 in 2024!

Maybe adb backup works also, but i didn't try that.
[Android Apps and Games] guags99:
Yep, That did it. All seems fine now. Not sure what happened.

It doesn't seem to have much of a pattern. It happens almost every time to me. It seems that if I change the repeat from "Track Endless", to "All", or "Folder", the next time I hit stop it stops. But then if I play again and hit stop again it just replays from the start of the track. However I should note that the player controls look as if it is stopped. The "play" button is visible and the progress slider doesn't move. I have to hit the "play" button and then pause to get it to stop
[Android Apps and Games] adolfotregosa:
thank you for the latest update, really made me happy to see a2dp pausing the music on disconnect, made my day :D !!

suggestion. When you press were it shows the artist, title,etc, it shows a list of the available music, great but.. put a circle or smt in front of the music that is plaing on that moment. So we can see were we are atm.

Another suggestion. Gapless playback would be a gold implementation.

Again, thank you. Really great work
[Android Apps and Games] Zürcher:
MortPlayer Audio Books 0.4

MortPlayer Audio Books 0.4

I have a HTC Hero

Is it possible that it takes more battery than onboard Player?

Can you make that it really closes the player on exit? (like push the back button twice)

I listen to long podcasts like FLOSS weekly & Engadet and your Player really pushed the pleasure to listen to it to the top :)

Please let it KISS

No Skin's

No more features

No more buttons

but stable and useful (like now)

Thank you so much for it.
[Android Apps and Games] Mort:
Quite probably. It has to save the position periodically. Save access is always quite consumptive (though it also depends a lot on the device). You can save some battery by increasing the save time span in the preferences.

I found some ways that could save a bit battery, which I'll implement in the next update, but I don't think the difference should be that much noticeable.

I could. But it already stops the service when the player's not visible and not playing, and that's all that's really required with Android's clever task management. With Android, task managers and "real close" are only required for badly coded apps. (I don't know how some apps are able to use 16% battery on my device when they should be suspended...)

I try... ;-)

Not that easy with Android's dynamic layouts anyway...

I guess I'll offer up to 2-3 alternatives (like "car mode" with big buttons and no cover) to select in the preferences, and stick to the customizable background image.

Wouldn't that be quite boring? ;-)

But I try to keep the main interface uncluttered.

So far I don't miss any as well, at least for the audio book version.

The music version already is getting separated "play mode" (track, folder, all) and "repeat mode" (on, off regarding to play mode, and track once) and might eventually get one for lyrics (but not before 1.0).

Current development state is attached. Landscape layout isn't finished yet, and there might be bugs esp. regarding the new play modes (the more possible combinations, the harder to test...).

Oh, being at "1.0". I think I'm pretty close, just have to hunt down some bugs (esp. that weird "stop button restarts track" bug on some devices, which I can't reproduce), and maybe add 2 more options (continue on headphone reconnect, disable standby).

After 1.0, things like lyrics or alarm clock might follow.
[Android Apps and Games] Zürcher:
MortPlayer Audio Books 0.4

MortPlayer Audio Books 0.4

I saw that, so I will increase that time slot.

I don't have a taskmgr. because I'm not root, but after reading your post I see it is also not necessary. Can you check your App with the SDK about proper sleeping and power consumption or how do you know?

Or a second Edition like MortPlayer Audio Books for cars :rolleyes:

By now you have 14 buttons. They are smart and in my case satisfy all I need to easy listen.
[Android Apps and Games] Mort:
To get battery consumption, there's an item in system settings, About phone.

For the developer, it's quite easy unless you make it unnecessarily complicated. Android suspends all "activities" (dialogs/windows) when they're not visible, only "remote services" keep on running. So, if there's no remote service or it's stopped when not needed, an app doesn't take any CPU and thus no battery if it's not visible (or doing something wanted, like playing music or switching profiles). Memory is occupied as long as it's not required otherwise, similar to Windows' DLL caching.

What makes it "unnecessarily complicated" usually are additional threads, which can cause quite a mess if not properly managed. But in many cases they're not even really required, "Handler" (something between Windows' PostMessage and WM_TIMER, just better) and "AlertService" (similar to WM's notifications) often do a better job with way less troubles.

I think that would be a bit too much splitting. Different apps for different jobs, yes, but different apps for different layouts, that'd be a bit over the top.

New features don't necessarily need new buttons. Some are in the options menu already (like the sleep timer), others might be in the preferences (e.g. sorting options) or just work silently without interaction (like position saving).