Restore deleted files on... Android !

For everything that's not in any way related to PureBasic. General chat etc...
Olli
Addict
Addict
Posts: 1071
Joined: Wed May 27, 2020 12:26 pm

Restore deleted files on... Android !

Post by Olli »

Hello !

A few days ago, my Samsung J3 felt my finger again without my consent (very sensitive touch screen). Result: I unwittingly deleted everything on my smartphone. I knew Undelete.EXE under Dos V5, but there, a Samsung J3, it's far from being the Dos 5. It has Android on it. I manage to access the Recovery menu of the Samsung J3, but it seems to be to rewrite the firmware startup. Does anyone have an idea how to restore all those files I sent to limbo? (Smartphone has been turned off ever since to avoid overwriting the contents of deleted files). Thanks in advance.
Bitblazer
Enthusiast
Enthusiast
Posts: 733
Joined: Mon Apr 10, 2017 6:17 pm
Location: Germany
Contact:

Re: Restore deleted files on... Android !

Post by Bitblazer »

Some recovery methods require you to act within 30 days on android, but this could help.

https://www.androidauthority.com/androi ... y-1073751/
webpage - discord chat links -> purebasic GPT4All
Olli
Addict
Addict
Posts: 1071
Joined: Wed May 27, 2020 12:26 pm

Re: Restore deleted files on... Android !

Post by Olli »

Which FAT type could it be ?

ext4?
XFS?
JFS?
btrfs?
ZFS?
Bitblazer
Enthusiast
Enthusiast
Posts: 733
Joined: Mon Apr 10, 2017 6:17 pm
Location: Germany
Contact:

Re: Restore deleted files on... Android !

Post by Bitblazer »

Fat32 / ExFat, Ext3, Ext4, Yaffs(2) or even Samsung RFS but it depends on the manufacturer and media type.
webpage - discord chat links -> purebasic GPT4All
User avatar
yoxola
Enthusiast
Enthusiast
Posts: 383
Joined: Sat Feb 25, 2006 4:23 pm

Re: Restore deleted files on... Android !

Post by yoxola »

If you registered a Samsung account(in most case you need to register to use the phone), there's a chance your files(mostly pictures) have a copy in the Samsung Cloud, or temporary left in your phone's recycle bin.

If you delete files physically when offline, it's really hard to recover from flash storage, depends on the flash storage brand and controller

Some nand controllers are very bad at recovering files, you can recover the file names, but the content are garbled even you did not overwrite it...
This field was left intentionally as signature.
Olli
Addict
Addict
Posts: 1071
Joined: Wed May 27, 2020 12:26 pm

Re: Restore deleted files on... Android !

Post by Olli »

Hello Yoxola,

I thank your opinion. But as I did not answer to bitBlazer about the article he linked, I do not have backup, neither cloud. I chose to refuse the Samsung cloud and the Samsung account. The reason ?

I do not like the updates which blend security and design. Trying to reinvent the wheel and do big mistakes of concept, it is a big problem. I love reinvent the wheel, and the persons who reinvent the wheel, but in a goal of perfection.

There, this device is a commercial product. He does not give to its clients the good arguments to overcome on Huawey, Sony, etc...

So, it is very hard to recovery deleted datas, but I am ready to destroy the device if necessary ! Imagine even I did not get a message << uh? root directory... Are you sure ? >> 5 gigabytes of updates not to have such a security. This demonstrates me that Samsung does not care about my life ! Behind there are lots of others problems of security. And take LINUX written in C for not to let the client write source codes in C in the device, it is really decide to make money blindly.

So, happily, it is not a problem to loose these datas, but I know my methods : I will recovery these files, and there won't be only the filename !!

So, I can read the second answer of bitBlazer : it is very interesting. And I thank you bitBlazer, because the first step to process (after having shutdown the device, and after having kept "ANDROID" freezed to shutdown), it is determining which type of FAT is used.

Knowing the last step (and the last chance to recovery the deleted datas) would be pass the memory socket through a good recorder oscilloscope.
Olli
Addict
Addict
Posts: 1071
Joined: Wed May 27, 2020 12:26 pm

Re: Restore deleted files on... Android !

Post by Olli »

In this menu :

Code: Select all

Reboot system now
Reboot to bootloader
Apply update from ADB
Apply update from SD Card
Wipe data/factory reset
Wipe cache partition
Mount /system
View recovery logs
Run graphic test
Run locale test
Power off
Lacking storage booting
It says << wipe cache partition >>. This means there is a cache. Of which cache it is ?

Also, in the << View recovery logs >> menu, I read this :

Code: Select all

/cache/recovery/last_log
/cache/recovery/last_kmsg
/cache/recovery/last_history
/cache/recovery/last_avc_msg_recovery
/cache/recovery/last_log.1
/cache/recovery/last_kmsg.1
/cache/recovery/last_log.2
/cache/recovery/last_kmsg.2
/cache/recovery/last_log.3
/cache/recovery/last_kmsg.3
/cache/recovery/last_log.4
/cache/recovery/last_kmsg.4
/cache/recovery/last_log.5
/cache/recovery/last_kmsg.5
/cache/recovery/last_log.6
/cache/recovery/last_kmsg.6
/cache/recovery/last_log.7
/cache/recovery/last_kmsg.7
/cache/recovery/last_log.8
/cache/recovery/last_kmsg.8
/cache/recovery/last_log.9
/cache/recovery/last_kmsg.9
Back
There is a file extract (they are xKB sized...)

Code: Select all

WARNING: CPU: 1 PID 1 at net/wireless/reg.c:511 regulatory_init+0x98/0x148()

What could it mean ?
Olli
Addict
Addict
Posts: 1071
Joined: Wed May 27, 2020 12:26 pm

Re: Restore deleted files on... Android !

Post by Olli »

Ok... In file last_log.1 it is told EXT4.

Second step : seek the FAT address.

EXT4 : (info source : wiki)
file size size : 44 bits
file name occupation : 2048 bits
file count size : 32 bits
Olli
Addict
Addict
Posts: 1071
Joined: Wed May 27, 2020 12:26 pm

Re: Restore deleted files on... Android !

Post by Olli »

I fall on this https://sourceforge.net/projects/ext2fsd/files/Ext2fsd/
Github is hard to explore (on smartphone anyway). So, this is the page of a coder studying EXT4.

I have read some datas came from Institut Blaise Pascal Paris, and certainly these datas also came from a deeper source...
https://github.com/bobranten
Olli
Addict
Addict
Posts: 1071
Joined: Wed May 27, 2020 12:26 pm

Re: Restore deleted files on... Android !

Post by Olli »

There is a block named "recovery". I suppose it is empty...

[edit]It is a little boring, but I downloaded ADB to try a recovery. I hope have time to discover ADB. Normally, I do not think I will need to destroy the smartphone. I imagine I won't get a whole recovery.
Olli
Addict
Addict
Posts: 1071
Joined: Wed May 27, 2020 12:26 pm

Re: Restore deleted files on... Android !

Post by Olli »

It's still crazy that this Samsung resisted me during these many moments during which I was soaked in alcohol up to the shoelaces, and that one day, in the middle of a period where I am dry as a roach in a collection of butterflies, I manage to smash the root directory...

Since the beginning that I have it, it has hit me. I stay focused on the screen to read the screen, while my thumb is several millimeters above the screen: not a millimeter, or two, no, at least five millimeters, and this smartphone, this J3, he considers, for some completely unknown reason that I'm touching the area. He clicks for me, on the screen, under my thumb. Right from the start, three years ago, I called them at Samsung France. I explained this phenomenon to them: they had nothing to do with it!
Bitblazer
Enthusiast
Enthusiast
Posts: 733
Joined: Mon Apr 10, 2017 6:17 pm
Location: Germany
Contact:

Re: Restore deleted files on... Android !

Post by Bitblazer »

Time to start using a backup strategy.

https://support.google.com/android/answer/2819582?hl=en

Too many people dont have one, till they need it because their old phone goes defunctional, then they get a new phone instantly and stare blankly at their new empty phone and wish they had a backup ;)

ps: brb - making backups ;)
webpage - discord chat links -> purebasic GPT4All
Post Reply