FORUMS
Remove All Ads from XDA

[Dev tool] Unpack .Dat compression on Your Android phone itself [Using Termux]

n/a posts
Thanks Meter: 0
 
By dg28gadhavi, Guest on 10th April 2017, 12:14 AM
Post Reply Email Thread
13th April 2019, 03:39 AM |#11  
HemanthJabalpuri's Avatar
Senior Member
Flag Repalle
Thanks Meter: 240
 
More
Quote:
Originally Posted by Wahyu6070

to repack the system folder to system.img. the code that I use: python img2simg.py system.img system2.img, posted on xpirt the way it is but can't.

How you got system folder? Did you mounted system.img to some folder?
13th April 2019, 03:47 AM |#12  
Wahyu6070's Avatar
Member
Flag Bojonegoro
Thanks Meter: 81
 
Donate to Me
More
I rented dat to img. then I uninstall the file system.img using zarchiver, and in that folder there are build pro files, prive apps etc., and how do I change it back to img ... then to dat
13th April 2019, 04:14 AM |#13  
HemanthJabalpuri's Avatar
Senior Member
Flag Repalle
Thanks Meter: 240
 
More
Quote:
Originally Posted by Wahyu6070

I rented dat to img. then I uninstall the file system.img using zarchiver, and in that folder there are build pro files, prive apps etc., and how do I change it back to img ... then to dat

I dont know how to do that from a folder....

But If you are using mobile you can mount it somewhere and tweak it....
Code:
mkdir /data/local/system
mount -t ext4 -o rw,noatime <system.img path> /data/local/system
You can now tweak /data/local/system folder ...

After tweaking that system folder you have to unmount /data/local/system
Code:
umount /data/local/system
img2simg system.img system_sparse.img
img2simg binary can be found in FlashFire apk lib folder for your arch...

Then you have to use img2sdat.py code.....
The Following User Says Thank You to HemanthJabalpuri For This Useful Post: [ View ] Gift HemanthJabalpuri Ad-Free
13th April 2019, 05:14 AM |#14  
Wahyu6070's Avatar
Member
Flag Bojonegoro
Thanks Meter: 81
 
Donate to Me
More
[QUOTE=HemanthJabalpuri;79325230]I dont know how to do that from a folder....

But If you are using mobile you can mount it somewhere and tweak it....
Code:
mkdir /data/local/system
mount -t ext4 -o rw,noatime <system.img path> /data/local/system
You can now tweak /data/local/system folder ...

After tweaking that system folder you have to unmount /data/local/system
Code:
umount /data/local/system
img2simg system.img system_sparse.img
img2simg binary can be found in FlashFire apk lib folder for your arch...

In flashfire.apk / lib / exist 2 folders (armeabi-v7a and x86) and deep in the folders of the fishery format libimg2simg.so not img2simg.py do I have to change the format
13th April 2019, 09:12 AM |#15  
HemanthJabalpuri's Avatar
Senior Member
Flag Repalle
Thanks Meter: 240
 
More
Quote:
Originally Posted by Wahyu6070

In flashfire.apk / lib / exist 2 folders (armeabi-v7a and x86) and deep in the folders of the fishery format libimg2simg.so not img2simg.py do I have to change the format

You have to rename it to img2simg.......
Note that img2simg and img2sdat.py are different ones.....
13th April 2019, 01:43 PM |#16  
Wahyu6070's Avatar
Member
Flag Bojonegoro
Thanks Meter: 81
 
Donate to Me
More
Quote:
Originally Posted by HemanthJabalpuri

I dont know how to do that from a folder....

But If you are using mobile you can mount it somewhere and tweak it....

Code:
mkdir /data/local/system
mount -t ext4 -o rw,noatime <system.img path> /data/local/system
You can now tweak /data/local/system folder ...

After tweaking that system folder you have to unmount /data/local/system
Code:
umount /data/local/system
img2simg system.img system_sparse.img
img2simg binary can be found in FlashFire apk lib folder for your arch...

Then you have to use img2sdat.py code.....

I think the code that is used cannot
Code:
1|[email protected]:/data/data/com.termux/files/home #
rw,noatime system.img /data/local/system              <
mount: 'system.img'->'/data/local/system': No such file or directory
13th April 2019, 02:19 PM |#17  
HemanthJabalpuri's Avatar
Senior Member
Flag Repalle
Thanks Meter: 240
 
More
Quote:
Originally Posted by Wahyu6070

I think the code that is used cannot

You need to first change working directory if you want to only use system.img as arg instead of whole path
Code:
cd <directory path to system.img>
13th April 2019, 02:53 PM |#18  
Wahyu6070's Avatar
Member
Flag Bojonegoro
Thanks Meter: 81
 
Donate to Me
More
Quote:
Originally Posted by HemanthJabalpuri

You need to first change working directory if you want to only use system.img as arg instead of whole path

Code:
cd <directory path to system.img>

Code:
ount -t ext4 -o rw,noatime <system.img path> /data/local/system                                     <
mount: bad /etc/fstab: No such file or directory
still can't
13th April 2019, 05:35 PM |#19  
HemanthJabalpuri's Avatar
Senior Member
Flag Repalle
Thanks Meter: 240
 
More
Quote:
Originally Posted by Wahyu6070

still can't

Your code is wrong...
Place system.img extracted from .dat file in /sdcard/Music folder and type following
Code:
su
mkdir /data/local/system
mount -t ext4 -o rw,noatime /sdcard/Music/system.img /data/local/system
Now you can go to /data/local/system and tweak it and unmount afterwards
Place img2simg binary in /sdcard/Music and
Code:
umount /data/local/system
exit
cp /sdcard/Music/img2simg $HOME
chmod +x $HOME/img2simg
cd $HOME
./img2simg /sdcard/Music/system.img /sdcard/Music/system_sparse.img
13th April 2019, 07:26 PM |#20  
Wahyu6070's Avatar
Member
Flag Bojonegoro
Thanks Meter: 81
 
Donate to Me
More
Quote:
Originally Posted by HemanthJabalpuri

Your code is wrong...
Place system.img extracted from .dat file in /sdcard/Music folder and type following

Code:
su
mkdir /data/local/system
mount -t ext4 -o rw,noatime /sdcard/Music/system.img /data/local/system
Now you can go to /data/local/system and tweak it and unmount afterwards
Place img2simg binary in /sdcard/Music and
Code:
cp /sdcard/Music/img2simg $HOME
chmod +x $HOME/img2simg
umount /data/local/system
cd $HOME
./img2simg /sdcard/Music/system.img /sdcard/Music/system_sparse.img

Code:
/system/bin/sh: su: not found
127|[email protected]:/data/data/com.termux/files/home #
d/Music/system.img /data/local/system                 <
[email protected]:/data/data/com.termux/files/home #
cp /sdcard/Music/img2simg $HOME
cp: //img2simg: Read-only file system
1|[email protected]:/data/data/com.termux/files/home #
chmod +x $HOME/img2simg
chmod: //img2simg: No such file or directory
1|[email protected]:/data/data/com.termux/files/home #
14th April 2019, 04:19 AM |#21  
HemanthJabalpuri's Avatar
Senior Member
Flag Repalle
Thanks Meter: 240
 
More
Quote:
Originally Posted by Wahyu6070

...

I updated the code at https://forum.xda-developers.com/and...5/post79328654

Follow above thing...
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes