+ Hello hello!
+
+ January 10th, 2025
+
+ I've added a blog! Been meaning to do that for a while, and I finally had something good to write about.
+ It may seem simple, but that took me multiple days to figure out. Modern internet moment ig.
+
+ I also did some slight changes to the home page, nothing major.
+
+ Now, personal time. I've been getting my life back together, getting things sorted out. It's going pretty
+ okay. We'll see how it goes from here.
+
+ I appreciate ya'll being here.
+
+
Hey.
@@ -26,7 +42,7 @@
Hibari-kun I like, thats big enough. Who would have thought that an 80s, somewhat obscure anime/manga would
only have low resolution images online.
- I'm here, I'm safe, and I appreciate y'all. See you soon.
+
I'm here, I'm safe, and I appreciate y'all. See you soon.
diff --git a/posts/privatedata.html b/posts/privatedata.html
new file mode 100644
index 00000000..e0d79b46
--- /dev/null
+++ b/posts/privatedata.html
@@ -0,0 +1,67 @@
+
+
+
+
+
+ Reading and writing in a package's private data folder in android
+
+
+
+ Reading and writing in a package's private data folder in android
+
+ Jan 10th, 2025
+
+ I recently found myself needing to copy the save data from one app to another on android. This apparently used
+ to be easy back before android 13. In 13, they added a data protection feature that prevents apps from accessing
+ each other's files. It makes a lot of sense, but theres no easy way for the user to get around these protections.
+
+
+ There was a lot of info online about how to solve this, but most of it didn't work for me. Probably has something
+ to do with the fact my phone is running android 15. I'm going to write the steps that worked for me here, to
+ hopefully help some people trying to do the same thing.
+
+ You will need to have USB debugging and ADB set up. There's plenty of info on the web about this.
+
+ Getting data out of a package's private data folder
+
+ This is a simple one-liner. Replace <your-package> with the name of the package you want to get the files
+ from. Replace <files/folders> with the files/folders you want out of the private folder.
+
+ adb exec-out run-as <your-package> tar c <files/folders> > output.tar
+
+ Putting data into a package's private data folder
+
+ This one is a little more complicted. In theory, adb exec-in
should work, but it didn't for me. We
+ are going to use run-as
from within an adb shell. This allows us to have the same file permissions
+ as the package we are writing the data to, meaning we can write to it's private data folder. Unfortunately, doing
+ this means that we can no longer read most files on the system, such as /sdcard
. Thankfully, packages
+ can read from /data/local/tmp
, so we can write the file there, and copy it to the private data folder.
+
+
+ adb push output.tar /data/local/tmp
+
+ Now we enter the shell and run-as
the package.
+
+ adb shell
+
+ run-as <your-package>
+
+ When this is done, we will be in the private data folder. Now we just need to copy the file and untar it.
+
+ cp /data/local/tmp/output.tar .
+
+ tar xvf output.tar
+
+ Aaaand that's it! The files should now be in the new folder. Run an ls
just to be sure.
+
+ Thanks for reading.
+
+
+
+
diff --git a/style.css b/style.css
index 6eabd148..6de3fb82 100644
--- a/style.css
+++ b/style.css
@@ -85,6 +85,14 @@ figcaption {
font-size: 23px; /* this sucks but i cant find a better way */
}
+nav p {
+ margin-top: 0px;
+}
+
+nav h3 {
+ margin-bottom: 0px;
+}
+
/* .buttons img {
margin: 2px;
} */
@@ -97,4 +105,4 @@ figcaption {
::selection {
color: #111318;
background: #F47D7B;
-}
\ No newline at end of file
+}