Patched Photo Pro 1.2 for non-official systems

Search This thread
TL;DR : working photo pro for systems without Sony telemetry services: AFH

Hey guys I've been running a GSI of Descendant OS on my Xperia 5 II and I have been trying to get this photo pro app to work. All the versions I found on apkmirror crashes on launch, not to mention the ones that refuse to install. So after tinkering with some magisk modules I decided to decompile it and see what's going on inside. After a bit of log checking, I discovered some unimplemented telemetry functions which seems to be the cause of those crashes. After patching these the app runs like how it should be. I also removed the restrictions in AndroidManifests.xml that prevents the app to be installed on devices without com.sony.device lib, so any system should be able to install it just fine (not sure why Sony set restrictions for photo pro but not cinema pro).

Let me know if there's more issues to be solved :D
 

patrickt

Senior Member
Apr 8, 2021
130
52
I've been running the APK from Photopro III for months and have had no significant issues. I got my APK from, I think, ADK.
 
@hx64 any chance for a patch for the latest version, or a guide as to how to patch it?
That would be awesome!
I'm a bit busy these days so maybe I'll work on that a few weeks later.
Meanwhile, what I did is fairly simple and anyone can do it themselves. Once the app crashes, grab the crash log with `adb logcat --buffer=crash` and find the entry with the package name. There will be an attribute that points to a specific line of code which caused the crash, usually an explicit error `throw` action. You'll then need to decompile the .apk file and modify the corresponding file. I use an extension called apklab in VScode but you can do it with apktool too. You should be able to edit the source code (.smali or .java, depending on the tools you used) and locate the lines that throw errors (based on my experience it is usually the unimplemented methods in com.sonyerricsson.idd.api.Idd component that caused the errors so I just removed those `throw` statements in .java files or replace them with `return-void` statements in .smali files). The last step is to recompile and sign the package (using the same tool you used to decompile). You may need to test and repeat these steps a few more times to resolve all the error throws but the process is fairly straight forward and you can find a lot of tutorials online.
Good luck fiddling!
 

SeventhRaven

Member
Feb 6, 2022
28
8
I'm a bit busy these days so maybe I'll work on that a few weeks later.
Meanwhile, what I did is fairly simple and anyone can do it themselves. Once the app crashes, grab the crash log with `adb logcat --buffer=crash` and find the entry with the package name. There will be an attribute that points to a specific line of code which caused the crash, usually an explicit error `throw` action. You'll then need to decompile the .apk file and modify the corresponding file. I use an extension called apklab in VScode but you can do it with apktool too. You should be able to edit the source code (.smali or .java, depending on the tools you used) and locate the lines that throw errors (based on my experience it is usually the unimplemented methods in com.sonyerricsson.idd.api.Idd component that caused the errors so I just removed those `throw` statements in .java files or replace them with `return-void` statements in .smali files). The last step is to recompile and sign the package (using the same tool you used to decompile). You may need to test and repeat these steps a few more times to resolve all the error throws but the process is fairly straight forward and you can find a lot of tutorials online.
Good luck fiddling!
I tried working on that by simply removing the requirements (although I actually have zero development experience), but I would always get a parsing error (probably an issue with the signing? No idea how to do that properly) when trying to install it.
As for the unmodified version, I cannot install it at all, as it says it's not compatible. So a crash technically never occurs.

But I don't mind waiting for a patch. Just glad to see it's an option still.
 
Last edited:
I tried working on that by simply removing the requirements (although I actually have zero development experience), but I would always get a parsing error (probably an issue with the signing? No idea how to do that properly) when trying to install it.
As for the unmodified version, I cannot install it at all, as it says it's not compatible (using a custom ROM). So a crash technically never occurs.

But I don't mind waiting for a patch. Just glad to see it's an option still.
Oh I forgot to mention the install issues. There's a `use-library` line in the AndroidManifest.xml that requires the `com.sony.device` library which you'll need to remove in order to install it on non-official systems.
And be sure to use deCOMPILE tools first (it won't work if you deCOMPRESS and edit since a signature is required), google for apktool or check out the apklab github page. I have little java knowledge previously but in this case fortunately you don't need much :D
I'll try switching to my dev environment as soon as possible.
 
  • Like
Reactions: SeventhRaven

SeventhRaven

Member
Feb 6, 2022
28
8
Oh I forgot to mention the install issues. There's a `use-library` line in the AndroidManifest.xml that requires the `com.sony.device` library which you'll need to remove in order to install it on non-official systems.
And be sure to use deCOMPILE tools first (it won't work if you deCOMPRESS and edit since a signature is required), google for apktool or check out the apklab github page. I have little java knowledge previously but in this case fortunately you don't need much :D
I'll try switching to my dev environment as soon as possible.
Yeah I tried apktool and I guess I recompiled it with Android Studio. All I changed was setting the requirement for com.sony.device lib to false.
I'll try my luck with the tool you've linked, thanks!
 
  • Like
Reactions: hx64

SeventhRaven

Member
Feb 6, 2022
28
8
I'm a bit busy these days so maybe I'll work on that a few weeks later.
Meanwhile, what I did is fairly simple and anyone can do it themselves. Once the app crashes, grab the crash log with `adb logcat --buffer=crash` and find the entry with the package name. There will be an attribute that points to a specific line of code which caused the crash, usually an explicit error `throw` action. You'll then need to decompile the .apk file and modify the corresponding file. I use an extension called apklab in VScode but you can do it with apktool too. You should be able to edit the source code (.smali or .java, depending on the tools you used) and locate the lines that throw errors (based on my experience it is usually the unimplemented methods in com.sonyerricsson.idd.api.Idd component that caused the errors so I just removed those `throw` statements in .java files or replace them with `return-void` statements in .smali files). The last step is to recompile and sign the package (using the same tool you used to decompile). You may need to test and repeat these steps a few more times to resolve all the error throws but the process is fairly straight forward and you can find a lot of tutorials online.
Good luck fiddling!
Welp, that was easy. Used VScode with the extension, swapped the lib flag to false and removed the component you mentioned. Now it works (although that bokeh setting still crashes it if selected, but whatever).

I've attached the patched .apk for your convenience. Big thanks again for pointing me towards those tools!

(I didn't touch anything else, though...so idk about analytics, but I firewall apps anyway so not like it can send anything)
 

Attachments

  • com.sonymobile.photopro_1.3.1.A.0.11_patched.apk
    27.8 MB · Views: 547
Last edited:
Welp, that was easy. Used VScode with the extension, swapped the lib flag to false and removed the component you mentioned. Now it works (although that bokeh setting still crashes it if selected, but whatever).

I've attached the patched .apk for your convenience. Big thanks again for pointing me towards those tools!
Nice work!
Glad I could help xD
 
  • Like
Reactions: SeventhRaven
Welp, that was easy. Used VScode with the extension, swapped the lib flag to false and removed the component you mentioned. Now it works (although that bokeh setting still crashes it if selected, but whatever).

I've attached the patched .apk for your convenience. Big thanks again for pointing me towards those tools!
Any chance someone could do this for the Video Pro app (1.0.a.0.26)?

I took a shot at trying to mod the apk..
I successfully installed with the Manifest.xml library edit, but upon crashing here's my log:
Code:
04-27 16:54:12.702  8085  8148 E AndroidRuntime: FATAL EXCEPTION: IddManagerThread
04-27 16:54:12.702  8085  8148 E AndroidRuntime: Process: jp.co.sony.mc.videopro, PID: 8085
04-27 16:54:12.702  8085  8148 E AndroidRuntime: java.lang.RuntimeException: Not an implementation
04-27 16:54:12.702  8085  8148 E AndroidRuntime:        at com.sonyericsson.idd.api.Idd.addEvent(Idd.java:114)
04-27 16:54:12.702  8085  8148 E AndroidRuntime:        at jp.co.sony.mc.videopro.idd.core.IddManager.addAppData(IddManager.kt:99)
04-27 16:54:12.702  8085  8148 E AndroidRuntime:        at jp.co.sony.mc.videopro.idd.core.IddManager.handleMessage(IddManager.kt:88)
04-27 16:54:12.702  8085  8148 E AndroidRuntime:        at jp.co.sony.mc.videopro.idd.core.IddManager.access$handleMessage(IddManager.kt:17)
04-27 16:54:12.702  8085  8148 E AndroidRuntime:        at jp.co.sony.mc.videopro.idd.core.IddManager$Companion$init$1$1.handleMessage(IddManager.kt:50)
04-27 16:54:12.702  8085  8148 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:102)
04-27 16:54:12.702  8085  8148 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:223)
04-27 16:54:12.702  8085  8148 E AndroidRuntime:        at android.os.HandlerThread.run(HandlerThread.java:67)

And this is where I get lost. Swapping the throw code in com.sonyerricsson.idd.api.Idd doesn't seem to solve the crashes, and I'm not sure where to go next. I don't see any HandlerThread or loop smali files, and in jp.co.sony.mc.videopro.idd.core.IddManager, I'm not familiar with the code in the lines where the errors are defined.
 
Last edited:
Welp, that was easy. Used VScode with the extension, swapped the lib flag to false and removed the component you mentioned. Now it works (although that bokeh setting still crashes it if selected, but whatever).

I've attached the patched .apk for your convenience. Big thanks again for pointing me towards those tools!

(I didn't touch anything else, though...so idk about analytics, but I firewall apps anyway so not like it can send anything)
Just installed your patched version on the latest Pixel Experience GSI (v414/June security patch) on a Xperia 1 III and it worked perfectly including bokeh.

Any chance you'll be sharing patched versions of more recent releases of the app?

Thanks!
 
Last edited:
Patched version of the latest (1.4.A.0.20-2621460) attached.

Thanks for your work around this @hx64.

@delfuhd I also could not untangle the logcat so I ended up replacing all instances of 'throw p0' in com.sonyericsson.idd.api.Idd with 'return-void' and there doesn't seem to be an issue (yet).
 

Attachments

  • com.sonymobile.photopro_1.4.A.0.20-2621460_minAPI31(arm64-v8a)(nodpi)_apkmirror.com.apk
    28.6 MB · Views: 279
  • Like
Reactions: delfuhd

gran_lexu

Senior Member
Jan 21, 2013
205
134
Madrid
Is the app asking for some Sony exclusive features? I mean, do we lose something like postprocessing or image management? thanks!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 6
    TL;DR : working photo pro for systems without Sony telemetry services: AFH

    Hey guys I've been running a GSI of Descendant OS on my Xperia 5 II and I have been trying to get this photo pro app to work. All the versions I found on apkmirror crashes on launch, not to mention the ones that refuse to install. So after tinkering with some magisk modules I decided to decompile it and see what's going on inside. After a bit of log checking, I discovered some unimplemented telemetry functions which seems to be the cause of those crashes. After patching these the app runs like how it should be. I also removed the restrictions in AndroidManifests.xml that prevents the app to be installed on devices without com.sony.device lib, so any system should be able to install it just fine (not sure why Sony set restrictions for photo pro but not cinema pro).

    Let me know if there's more issues to be solved :D
    3
    @hx64 any chance for a patch for the latest version, or a guide as to how to patch it?
    That would be awesome!
    I'm a bit busy these days so maybe I'll work on that a few weeks later.
    Meanwhile, what I did is fairly simple and anyone can do it themselves. Once the app crashes, grab the crash log with `adb logcat --buffer=crash` and find the entry with the package name. There will be an attribute that points to a specific line of code which caused the crash, usually an explicit error `throw` action. You'll then need to decompile the .apk file and modify the corresponding file. I use an extension called apklab in VScode but you can do it with apktool too. You should be able to edit the source code (.smali or .java, depending on the tools you used) and locate the lines that throw errors (based on my experience it is usually the unimplemented methods in com.sonyerricsson.idd.api.Idd component that caused the errors so I just removed those `throw` statements in .java files or replace them with `return-void` statements in .smali files). The last step is to recompile and sign the package (using the same tool you used to decompile). You may need to test and repeat these steps a few more times to resolve all the error throws but the process is fairly straight forward and you can find a lot of tutorials online.
    Good luck fiddling!
    3
    I'm a bit busy these days so maybe I'll work on that a few weeks later.
    Meanwhile, what I did is fairly simple and anyone can do it themselves. Once the app crashes, grab the crash log with `adb logcat --buffer=crash` and find the entry with the package name. There will be an attribute that points to a specific line of code which caused the crash, usually an explicit error `throw` action. You'll then need to decompile the .apk file and modify the corresponding file. I use an extension called apklab in VScode but you can do it with apktool too. You should be able to edit the source code (.smali or .java, depending on the tools you used) and locate the lines that throw errors (based on my experience it is usually the unimplemented methods in com.sonyerricsson.idd.api.Idd component that caused the errors so I just removed those `throw` statements in .java files or replace them with `return-void` statements in .smali files). The last step is to recompile and sign the package (using the same tool you used to decompile). You may need to test and repeat these steps a few more times to resolve all the error throws but the process is fairly straight forward and you can find a lot of tutorials online.
    Good luck fiddling!
    Welp, that was easy. Used VScode with the extension, swapped the lib flag to false and removed the component you mentioned. Now it works (although that bokeh setting still crashes it if selected, but whatever).

    I've attached the patched .apk for your convenience. Big thanks again for pointing me towards those tools!

    (I didn't touch anything else, though...so idk about analytics, but I firewall apps anyway so not like it can send anything)
    1
    @hx64 any chance for a patch for the latest version, or a guide as to how to patch it?
    That would be awesome!
    1
    I tried working on that by simply removing the requirements (although I actually have zero development experience), but I would always get a parsing error (probably an issue with the signing? No idea how to do that properly) when trying to install it.
    As for the unmodified version, I cannot install it at all, as it says it's not compatible (using a custom ROM). So a crash technically never occurs.

    But I don't mind waiting for a patch. Just glad to see it's an option still.
    Oh I forgot to mention the install issues. There's a `use-library` line in the AndroidManifest.xml that requires the `com.sony.device` library which you'll need to remove in order to install it on non-official systems.
    And be sure to use deCOMPILE tools first (it won't work if you deCOMPRESS and edit since a signature is required), google for apktool or check out the apklab github page. I have little java knowledge previously but in this case fortunately you don't need much :D
    I'll try switching to my dev environment as soon as possible.