Recent

Author Topic: Where is installed an app created with LAMW?  (Read 3262 times)

Bandy

  • Jr. Member
  • **
  • Posts: 84
Where is installed an app created with LAMW?
« on: July 28, 2025, 12:03:10 pm »
Hello, guys.

An app created with LAMW in what folder is installed and how can I view that folder?

Bandy

  • Jr. Member
  • **
  • Posts: 84
Re: Where is installed an app created with LAMW?
« Reply #1 on: July 30, 2025, 08:11:45 pm »
Somebody... can help?

lainz

  • Hero Member
  • *****
  • Posts: 4738
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: Where is installed an app created with LAMW?
« Reply #2 on: July 30, 2025, 10:14:51 pm »
Hi, any android application is installed in data > data, and no, you can't view that folder, except if you have your phone rooted, that's a bad idea.

dseligo

  • Hero Member
  • *****
  • Posts: 1601
Re: Where is installed an app created with LAMW?
« Reply #3 on: July 31, 2025, 01:09:29 am »
As lainz said, you can't view that directory.
But you have 'GetEnvironmentDirectoryPath' function, so you can get path where your app, data, etc. is located:
Code: Pascal  [Select][+][-]
  1. function jForm.GetEnvironmentDirectoryPath(_directory: TEnvDirectory): string;

Here is your TEnvDirectory type:
Code: Pascal  [Select][+][-]
  1.    TEnvDirectory = (dirDownloads,
  2.                     dirDCIM,
  3.                     dirMusic,
  4.                     dirPictures,
  5.                     dirNotifications,
  6.                     dirMovies,
  7.                     dirPodcasts,
  8.                     dirRingtones,
  9.                     dirSdCard,
  10.                     dirInternalAppStorage,
  11.                     dirDatabase,
  12.                     dirSharedPrefs,
  13.                     dirCache,
  14.                     dirDocuments); //warning: if Device Api < 19 then return dirDownloads!

Bandy

  • Jr. Member
  • **
  • Posts: 84
Re: Where is installed an app created with LAMW?
« Reply #4 on: August 01, 2025, 01:22:23 pm »
I don't have any data folder (data > data) in internal storage. In Internal Storage I have the following folders: .aptoide, .face, Android, DCIM, Documents, Download, FileManager, Movies, Music, Notifications, Pictures, Recordings, Samsung. I have Samsung Galaxy A32 5G smartphone with Android 13.

Please explain more.

dseligo

  • Hero Member
  • *****
  • Posts: 1601
Re: Where is installed an app created with LAMW?
« Reply #5 on: August 01, 2025, 01:31:44 pm »
I don't have any data folder (data > data) in internal storage. In Internal Storage I have the following folders: .aptoide, .face, Android, DCIM, Documents, Download, FileManager, Movies, Music, Notifications, Pictures, Recordings, Samsung. I have Samsung Galaxy A32 5G smartphone with Android 13.

Please explain more.

Did you try 'GetEnvironmentDirectoryPath' function?

You can also try 'GetFilePath' function.

Put a button on your form, and in OnClick event just put:
Code: Pascal  [Select][+][-]
  1. ShowMessage(GetFilePath(fpathApp));

Bandy

  • Jr. Member
  • **
  • Posts: 84
Re: Where is installed an app created with LAMW?
« Reply #6 on: August 01, 2025, 03:33:57 pm »
I tried ShowMessage(GetFilePath(fpathApp)); and the message is displayed to fast (for 2-3 seconds) and is to long to be displayed in full, but the path starts with /data/app/xxxxxxxxx. It means Internal Storage/data/app/xxxxxxxxx?
xxxxxxxxx means the rest of the message.

dseligo

  • Hero Member
  • *****
  • Posts: 1601
Re: Where is installed an app created with LAMW?
« Reply #7 on: August 01, 2025, 11:05:51 pm »
Put EditText on a form and change code to something like this:
Code: Pascal  [Select][+][-]
  1. EditText1.Text := GetFilePath(fpathApp);

Bandy

  • Jr. Member
  • **
  • Posts: 84
Re: Where is installed an app created with LAMW?
« Reply #8 on: August 03, 2025, 12:39:24 pm »
I put EditText1 on the form and use the code EditText1.Text := GetFilePath(fpathApp);. The path showed is /data/app/~~iK1z_o5BdMZWUNvhxzs7VA==/org.lamw.prognoza-zrId-2nkukEyuNRrcAoMZg==/base.apk

1. This path is on Internal Storage, I mean on Internal Storage/data/app/~~iK1z_o5BdMZWUNvhxzs7VA==/org.lamw.prognoza-zrId-2nkukEyuNRrcAoMZg==/base.apk? In this folder my app is installed?

2. I need to create manually (not by code) a *.txt file in the folder where my app is installed to debug my app. How can I do it? With root? Where can I find info on how to root my smartphone?

Please guys...

dseligo

  • Hero Member
  • *****
  • Posts: 1601
Re: Where is installed an app created with LAMW?
« Reply #9 on: August 03, 2025, 07:13:34 pm »
2. I need to create manually (not by code) a *.txt file in the folder where my app is installed to debug my app. How can I do it? With root? Where can I find info on how to root my smartphone?

You don't need to root your phone for that.

I do it like this (this is mostly from my app, but I changed it a little bit because variables are in my local language and I have them in object, so this is simplified):
Code: Pascal  [Select][+][-]
  1. procedure Log(const ATekst: String);
  2. var sLogFile: String;
  3.     f: Textfile;
  4. begin
  5.   sLogFile := GetFilePath(fpathData) + '/mylog.txt';
  6.   AssignFile(f, sLogFile);
  7.   If not FileExists(sLogFile) then
  8.     Rewrite(f)
  9.   else
  10.     Append(f);
  11.   WriteLn(f, FormatDateTime('yyyy-mm-dd hh:nn:ss.zzz ', Now) + ATekst)
  12.   CloseFile(f);
  13. end;
  14. ...
  15. Log('test 1');
  16. ...
  17. Log('test 2: ' + IntToStr(SomeVariableToLog);
  18. ...
  19. // I have some form with EditText set to multiline and across whole form
  20. // There I show log like this:
  21. procedure TfmMyLogForm.btnShowLogClick(Sender: TObject);
  22. var f: Textfile;
  23.     sLogFile: String;
  24.     s: String;
  25. begin
  26.   sLogFile := GetFilePath(fpathData) + '/mylog.txt';
  27.   edStatus.Text := '';
  28.   If not FileExists(sLogFile) then
  29.     Exit;
  30.  
  31.   AssignFile(f, sLogFile );
  32.   Reset(f);
  33.   While not Eof(f) do
  34.   begin
  35.     ReadLn(f, s);
  36.     edStatus.AppendLn(s);
  37.   end;
  38.   CloseFile(f);
  39. end;

I hope this is enough to get you started.

Bandy

  • Jr. Member
  • **
  • Posts: 84
Re: Where is installed an app created with LAMW?
« Reply #10 on: August 04, 2025, 09:50:50 am »
Thank you, dseligo.

But I insist to help me with root because I need to manually create that file (not by code as you showed me) to SEE what's written in that file and what portions are deleted from that file in order to debug my Android app. I have errors in my app.

Once again, please help me guys.

Seenkao

  • Hero Member
  • *****
  • Posts: 718
    • New ZenGL.
Re: Where is installed an app created with LAMW?
« Reply #11 on: August 04, 2025, 11:39:28 am »
But I insist to help me with root because I need to manually create that file (not by code as you showed me) to SEE what's written in that file and what portions are deleted from that file in order to debug my Android app. I have errors in my app.
Для вывода логов, вам не обязательно получать root-доступ. Вашему приложению должно быть разрешено читать и писать фалы (доступ к файлам). Вам достаточно сохранить лог в той папке, к которой у вас есть доступ.
Так же вы можете отлаживать приложения при подключении к компьютеру. LAMW вроде как поддерживает данную отладку (но я не пользовался).


Google translate:
To output logs, you do not need to get root access. Your application must be allowed to read and write files (file access). You just need to save the log in the folder to which you have access.
You can also debug applications when connected to a computer. LAMW seems to support this debugging (but I have not used it).
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL

GeraldinePointer

  • Newbie
  • Posts: 1
Re: Where is installed an app created with LAMW?
« Reply #12 on: August 16, 2025, 06:42:29 am »
very good

 

TinyPortal © 2005-2018