언어 설정

Menu
Sites
Language
Cannot find created files on Device

Hi,

I'm working on generating some bitmap files from canvas and in order to debug possible issues I want to dump the bitmap to a file. 

The code seems to work correctly but I'm unable to find the file I'm creating on the device. The file is created correctly as I don't get any error and I'm also able to re-open the file successfully. 

I tried to create the file both on data and on shared/data. Both scucceed but when I use connection explorer or SDB to look into the device I don't find those directories.

All I see on the device is: 

/opt/apps/<appID>/shared/res/screen-density-high

/opt/apps/<appID>/shared/trusted

I also tried to pull the whole /opt/apps/appID folder but no luck either.

Any suggestions on where I can find the files I create?

 

If you'd like more details here is the code and deboug log:

String dstPath = Tizen::App::App::GetInstance()->GetAppRootPath() + L"shared/data/test_out.xbm";
AppLog("Dump bitmap to file %ls", dstPath.GetPointer());
r = img.EncodeToFile(*textBitmap, IMG_FORMAT_BMP, dstPath, true);
AppAssertf(!IsFailed(r), "Failed to encode bitmap to file");
//Double check the file was created successfully
Tizen::Io::File testReopen;
r = testReopen.Construct(dstPath, "r");
if (r == E_SUCCESS) {
    AppLog("File was opened successfully");
}

Log output:

09-23 12:02:22.355 : INFO / TestGlesCanvasTexture ( 1830 : 1830 ) : bool GlesCanvasTexture::_InitCanvasTexture(const std::string &, float, float, int, int, void *)(540) > Dump bitmap to file /opt/apps/Etr3e8zVz6/shared/data/test_out.xbm
09-23 12:02:22.410 : INFO / TestGlesCanvasTexture ( 1830 : 1830 ) : bool GlesCanvasTexture::_InitCanvasTexture(const std::string &, float, float, int, int, void *)(548) > File was opened successfully
 

 

Edited by: Brock Boland on 17 3월, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.

Responses

5 댓글
Zoltan Puski
1) use "sdb" from command line: connect your phone cmd.exe cd c:\tizen\tools sdb root on sdb pull cd /opt/apps//data/img.png c:\ -or- 2) use sdb to make a screenshot, so you do not need "code" cd c:\tizen\tools sdb shell xwd -root -out /tmp/__screen.xwd Now in the IDE you can see this __screen.xwd image file, which easily you can download. Or just use the method in 1) to download this file
Zoltan Puski
sorry, mistake: sdb pull cd /opt/apps//data/img.png c:\ ----> sdb pull /opt/apps//data/img.png c:\
Stefano Zanetti
Thanks for your help Zoltan Unfortunately that command didn't work. It seems like it cannot find the file. sdb pull /opt/apps/Etr3e8zVz6/shared/data/test_out.xbm . 0 file(s) pulled. 1 file(s) skipped. /opt/apps/Etr3e8zVz6/shared/data/test_out.xbm 0 KB/s (0 bytes in 0.028s)
youngsik yoon
by default, you can access shared/data folder from your app. but can't access from sdk because of SMACK check. so as zoltan said, please do "sdb root on" first from command line. and in connection explorer of sdk, select the device and press F5 or click "refresh" on popup menu to apply root access. then you will be able to access /opt/apps/[pid]/shared/data from sdk.
Stefano Zanetti
Thanks for the clarification youngsik. Yes I forgot to turn the root on. Now it's working correctly.