Jump to content

Bart Kindt

Members
  • Content Count

    37
  • Joined

  • Last visited

Posts posted by Bart Kindt


  1. The problem is this.

    "Storage updates in Android 11

    Android 11 (API level 30) further enhances the platform, giving better protection to app and user data on external storage. This release introduces several enhancements, such as raw file path access, batch edit operations for media, and an updated UI for the Storage Access Framework.

    The release also offers improvements to scoped storage, which makes it easier for developers to fulfill their storage use cases after they migrate to using this storage model.

    Scoped storage enforcement

    Apps that run on Android 11 but target Android 10 (API level 29) can still request the requestLegacyExternalStorage attribute. This flag allows apps to temporarily opt out of the changes associated with scoped storage, such as granting access to different directories and different types of media files. After you update your app to target Android 11, *the system ignores the requestLegacyExternalStorage flag*.

    "

    But in in 12 and 13 this got even worse. In 13 you now even must request special permissions to read Image files (seperately). Internet info states I am completely stuffed. The only way could be to use the external SDCard. But, there is no fixed access path to this. It seems to depend on the type of phone.

     

    I was hoping that somebody in this forum is an Android expert...

     


  2. 45 minutes ago, Dalija Prasnikar said:

    >Did you deploy that application in debug mode?

     

    I may have stuffed up the mix between Debug/Release and GooglePlay vs Development after I upgraded to 12.

    However, I have un-installed the App, and re-installed it, and now I can no longer access the Database files in the *public* Document directory.

    This is an issue started in Android 11, but since Android 13 it has become impossible to access (read/write) any files even in the so called 'public' directory structures.

    It is a complete disaster, completely idiotic (the are supposed to be PUBLIC) but in the meantime I have lost access to my own files.

     

     


  3. After upgrading to Delphi 12, I could no longer install my personal App (for myself only) on my phone, du to incompatible signature.

    So I had to un-install the App, then re-install it.

    Before I did this, I copies the master database stucture from the *public* Documents directory to the SDCard and also to my Windows PC using 'OwnFiles'.

    Both the 'OwlFiles' and the Android Files programs had full access to it.

    After re-installing my App, I no longer can open the database file. I can see it, it exists. But no matter what I try, I can no longer open the file.

     

    Android 13.

     

    Also after copying the files straight back from the Windows PC (therefore without any original ownership).

     

    Now, I don't care *where* the bloddy files are; I can change the location in my App anywhere. But there seems to be no way my app can access *ANY* PUBLIC directories anymore.

    But the 'File managers', they CAN have full access!

     

    How can I find ANY place on my Android device where I can read a file which is supplied by nother program, OR copied in place by a file manager (from Windows).

    How can I for example IMPORT the original files, and then copy them back in place?

     

    Bart

     


  4. 10 hours ago, FPiette said:

    When installing retail Delphi 12, the installer should have removed the beta version.

    Try running the installer again and select remove product (or similar item).

    Then reboot your computer.

    Then run the installer to install only Delphi.

     

     

    I installed from the ISO file. When I run the ISO install again, I do not get any options, except that it is *required* that I un-install the 'current' version  first. Which is the *same* version.


  5. I installed RadStudio 12 while I still hade the Beta licence going, and I also activated C++.

    I was not aware that my *licence* does not cover C++ (I have never used it).

    Now I cannot start Delphi 12, because it says my licence does not cover C++.

     

    How to re change the installation to remove the C++ without having to wipe the entire installation (yet again) and have to completly start from scratch?

     

    Bart

     


  6. 7 hours ago, Angus Robertson said:

    I have batch command files that handle all the signing, and then sign the final setup file, using InnoSetup pre and post compile steps.  Better to use CMD extension for Windows 11, BAT is deprecated. 


    [PostCompile]
    Name: "signsetup.bat"

    [PreCompile]
    Name: "compress.bat"

     

    Angus

     

    That is not even required. I have now found Inno Setup does it all for you. We are getting way out of Delphi topic here, but this is what I now have in Inno Setup, and it does it all:

     

    Tools>Configure Sign Tools:

    signtool="C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64\signtool" sign /a /fd SHA256 $f

     

    [Setup]
    SignTool=SignTool

     

    [Files]
    Source: "*.exe"; DestDir: "{userappdata}\SARTrack\exe"; Flags: recursesubdirs ignoreversion signonce
    Source: "*"; Excludes: "*.exe"; DestDir: "{userappdata}\SARTrack\exe"; Flags: recursesubdirs ignoreversion

     

    (where \SARTrack\exe is my destination dir)

     

    This signs *all* executables, then it signs itself.

    • Thanks 3

  7. 1 hour ago, Angus Robertson said:

    Not used the signcode /sha1 argument before, it is more common to use :

     

    /a /s MY /n "Common name"   (this all replaces /f in my earlier example)

     

    where /a automatically looks for a signing certificate, /s is the Windows store (MY is the name for Personal), and the Common Name is usually your company name, but whatever is shown on the General certificate dialog tab for 'Issued to', or CN= under Subject on the Details tab. 

     

    Angus

     

    What I don't understand is where the SignTool gets its access to the USB dongle to. From what I understand it must be installed for the signing to work.

    So, it is installed. And the Background application SafeNet Authotication Client is also running.

    So where in all the SignTool command line is the link to the actual USB dongle?

    ..........

     

    Well, I will never know how it does it, but this command:

    "signtool sign /a /fd SHA256 MyFile.exe"

    simply worked... I had to enter the USB Token password, and that was all. Obviousely the signtool detects the presence of the Token, connects to it (God knows how) and retrieves the required data.

     

    So last thing I now have to sort out is to program InnoSetup to also sign all executables inside the package, which seems to be possible.

    Big thanks to all who replied, I learned a lot!

     

    Bart, New Zealand


  8. 1 hour ago, Vincent Parrett said:

    Good God. Well that explains a lot. 

    In my case, the USB token is installed in my development laptop.

    I do not have to use a 'remote USB',

    So would I still have to use this VirtualHere software as mentioned in this link?

    Somehow I need to link the Delphi IDE directly to the Token, and it expects .pfx file.

    Not a .cer file. And the CE/EV  (Extended Validation) token is required to be installed during compilation. So the compiler can load the certificate.

    I totally do not understand how this can be achieved in Delphi

     

    I am an absolute beginner here, if somebody can show me the steps I have to take; And please *backwards*, starting with what I should enter in the Delphi IDE. Then following that, how the required file can be loaded, live, during compilcation, into the final executable, all while this requirement is met that the USB Token is in fact installed during the very compilcation process.

     

    Thanks, Bart


  9. 3 hours ago, Angus Robertson said:

    Is this a Code Signing certificate?  If so, you can not export the private key from the token, so no reason to export the certificate either.  

     

    If not, why did Digicert supply it on a token?

     

    Angus

     

    Yes, it is a Code Signing certificate. I have to work my way through the other posts and software mentioned, but I also was thinking the same thing. The special software which I had to download (SafeNet Authentication Client, from Thales Group) to be able to manipulate the hardware token only has the option to "Install Certificate" which seems to be an "Import" not an export.

    I have never done this in my live, and I would have expected that the IDE can be pointed to the actual hardware USB token to read the required Certificate data and to add this to the executable.

    Why would I have to copy things to my local hard drive, why would I have to convert this file to yet another format, it does not many any sense! If it is copied onto my local drive, and the Hardware Token is not used at all, where is the security during final compilation??

     

    Bart


  10. So I finally got a DigiCert certificate.

    The hardware USB token is in the PC.

     

    Now what??

    I don't see any way to link my Windows program to this USB token in the IDE...

     

    Okay, I now managed to export the Certificate to a file: It is a .cer file. It is not a text file.

    But when I try to add a Certificate File in the IDE, it asks for a .pfx file (a Personal Information Exchange) file.

     

    That looks to be something totally different.

     

    Thanks, Bart


  11. In my Android app, in the Service, I have code which in Delphi 12 no longer works, and I don't understand why:

     

    Type

      TLocationListener = class; // <<<<[DCC Error] DTBU.pas(39): E2291 Missing implementation of interface method JLocationListener.onFlushComplete

     

    // Then in TDTBThread:

    locationListener : TLocationListener;

     

    // then further down:

    type 

      TLocationListener = class(TJavaLocal, JLocationListener)
      public
        constructor Create;
        procedure onLocationChanged(location: JLocation); overload; cdecl;
        procedure onLocationChanged(locations: JList); overload; cdecl;
        procedure onProviderDisabled(provider: JString); cdecl;
        procedure onProviderEnabled(provider: JString); cdecl;
        procedure onStatusChanged(provider: JString; status: Integer; extras: JBundle); cdecl;

      end;

     

    The code is from years ago; Should I do it in a different way?

     


  12. Final solution:

    First I uninstalled via Windows. But this did not do the request to clear all registery data, so new installation was worse than the original situation.

     

    But when I run the (ISO) installation direct, I could tell the installer to clear everything during un-install.

    When the system was re-installing I could tell it to install the SDK and related stuff.

     

    Now everything finally seems complete.

     

    • Like 1

  13. I am now completely uninstalling the whole system.

    ...

    I have now re-installed. And now I have lost everything!  The Options>Deployment>SDK manager is now completely empty!

    I did see a flash of a CMD window with something like 'file not found' but was gone to quick.

     

    What must I now do to completely delete the entire installation (icluding all registry) and how am I supposed to get Delphi 12 installed properly??

     


  14. I cannot make this work.

    The entire directory AndroidSDK-2525-23.0.50371.5667\ does not exist.

    I then downloaded the 'build-tools' from the android website, created this directory and copied the build-tools into it.

    The PATH to the C:\Program Files\Eclipse Adoptium\ exists (and it is installed)

     

    When I run the command line, I get this error:

    Error: Could not determine SDK root.
    Error: Either specify it explicitly with --sdk_root= or move this package into its expected location: <sdk>\cmdline-tools\latest\

     

    When I then try to add the --sdk_root I get the error:

    Error: Unknown argument "--sdk_root C:\.....

     

    What a mess.

    What must I do to make it work?

     


  15. The Delphi 12 SDK is pre-set to:

    C:\Users\Public\Documents\Embarcadero\Studio\23.0\CatalogRepository\AndroidSDK-2525-23.0.50371.5667

     

    But it is not there, and I cannot seem to find it on the internet.

    The one in stalled with Delphi 11 does not seem to be up-to-date for Delphi 12.

     

    How and where do I download this?

     

×