General Play-systemupdate 20220118 - Google Pixel 6 Pro

I received yet another Play-systemupdate today (second one in January).
The date - after update - is still reading "December 1, 2021".
However, the following package was updated:
Code:
--before--
com.google.mainline.telemetry | 2021-11-01S+| (311102024)
--after--
com.google.mainline.telemetry | 2021-11-01S+| (311104004)

Seeing this, I decided to manually check and I got another update too (597 kB), still on December.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Click to expand...
Click to collapse
Click to expand...
Click to collapse

Just checked the play system on my phone. Date is Dec 1, 2021 and no update found.

Is there still no way to force these updates? I am still running December^^

Forgot to mention that it was indeed 599K on size.

Same thing here, update was 597kb and still says December.

This is the first time I checked for a playsystem update since my Nokia 6.1 I forgot about these..

Is there anyway to verify before and after the update, that things are being updated? That would be great.

fil3s said:
This is the first time I checked for a playsystem update since my Nokia 6.1 I forgot about these..
Click to expand...
Click to collapse
Google started Play System updates (previously: Project Mainline) with Android 10 (splitting the firmware updates - taking stuff out of the Android operating system, transforming certain functions as an app to ensure timely updates with third party manufacturers through simple updates through Google Playstore - meaning that will help Android phones get critical and essential updates a lot sooner because none of the changes will require a system update from the phone manufacturer).

Alekos said:
Is there anyway to verify before and after the update, that things are being updated? That would be great.
Click to expand...
Click to collapse
Check this link:
Google starts detailing what's new in its monthly Google Play system updates
Now you will know which exact update to blame when something breaks
www.androidpolice.com

foobar66 said:
Check this link:
Google starts detailing what's new in its monthly Google Play system updates
Now you will know which exact update to blame when something breaks
www.androidpolice.com
Click to expand...
Click to collapse
I've read that. I've been disappointed actually in how integrated Play Services is getting. So many things are now part of Play Services its making Android Forks harder to use without GAPPS. Anyway that's a different issue altogether.
I was more interested in your op about the files that were changed on the system. I commented on another post that System Update has had an issue for more than 2 years (on some pixels like I have experienced) where after it updates it reverts to the same (or sometimes an older) date/month. I had a case open with Google Support since last May but they stopped responding.
You have come closest to providing specific changes after this specific update, than I've seen in the past few years. I was hoping maybe for a before and after of some sort, to verify that the Play System update actually updated, and that the date is wrong. I had the date be behind over 6 months at some points. Wiping, flashing original firmware builds etc didn't fix it. It eventually got resolved after A12 for my 2 devices (Pixel 3xl) but I also had it be behind 2 months in December on my 6 Pro.

It is actually a (reasonably) simple linux/bash script which I run before/after upgrade. Then do a 'tkdiff' (if you know what that means) to visualize the deltas. Source code (feel free to (re)use).
Code:
#!/bin/bash
display_usage() {
echo "usage: $0 [{system|user}] [{path|pkg}] [{disabled|enabled}] [<filter>] ($1)"
}
SCNT=0
UCNT=0
PACNT=0
PKCNT=0
DCNT=0
ECNT=0
# by default we put package in first column
PPATH=false
# FLAGS1 selects between user (-3) and system (-s)
FLAGS1=""
# FLAGS2 selects between disabled (-d) and enabled (-e)
FLAGS2=""
# by default there is no grep filter
FCNT=0
FILTER=0
while [[ $# -gt 0 ]]; do
case $1 in
"user")
if [ $SCNT -eq 1 ]; then
display_usage "'user' and 'system' cannot occur together on the command line"
exit 1
fi
if [ $UCNT -eq 0 ]; then
UCNT=$((UCNT + 1))
FLAGS1="-3"
else
if [ $UCNT -eq 1 ]; then
display_usage "'user' can only occur once on the command line"
exit 1
fi
fi
;;
"system")
if [ $UCNT -eq 1 ]; then
display_usage "'user' and 'system' cannot occur together on the command line"
exit 1
fi
if [ $SCNT -eq 0 ]; then
SCNT=$((SCNT + 1))
FLAGS1="-s"
else
if [ $SCNT -eq 1 ]; then
display_usage "'system' can only occur once on the command line"
exit 1
fi
fi
;;
"enabled")
if [ $DCNT -eq 1 ]; then
display_usage "'enabled' and 'disabled' cannot occur together on the command line"
exit 1
fi
if [ $ECNT -eq 0 ]; then
ECNT=$((ECNT + 1))
FLAGS2="-e"
else
if [ $ECNT -eq 1 ]; then
display_usage "'enabled' can only occur once on the command line"
exit 1
fi
fi
;;
"disabled")
if [ $ECNT -eq 1 ]; then
display_usage "'enabled' and 'disabled' cannot occur together on the command line"
exit 1
fi
if [ $DCNT -eq 0 ]; then
DCNT=$((DCNT + 1))
FLAGS2="-d"
else
if [ $DCNT -eq 1 ]; then
display_usage "'disabled' can only occur once on the command line"
exit 1
fi
fi
;;
"path")
if [ $PKCNT -eq 1 ]; then
display_usage "'path' and 'pkg' cannot occur together on the command line"
exit 1
fi
if [ $PACNT -eq 0 ]; then
PACNT=$((PACNT + 1))
PPATH=true
else
if [ $PACNT -eq 1 ]; then
display_usage "'path' can only occur once on the command line"
exit 1
fi
fi
;;
"pkg")
if [ $PACNT -eq 1 ]; then
display_usage "'path' and 'pkg' cannot occur together on the command line"
exit 1
fi
if [ $PKCNT -eq 0 ]; then
PKCNT=$((PKCNT + 1))
PPATH=false
else
if [ $PKCNT -eq 1 ]; then
display_usage "'ppk' can only occur once on the command line"
exit 1
fi
fi
;;
*)
if [ $FCNT -eq 1 ]; then
display_usage "there can only be 1 filter argument"
exit 1
fi
FCNT=$((FCNT + 1))
FILTER="$1"
;;
esac
shift
done
if [ $FCNT -eq 0 ]; then
pkg=$(adb shell pm list packages $FLAGS1 $FLAGS2 -f | colrm 1 8 | sort)
else
pkg=$(adb shell pm list packages $FLAGS1 $FLAGS2 -f | colrm 1 8 | grep "$FILTER" | sort)
fi
LI=()
for P in $pkg; do
if [ $PPATH == "true" ]; then
# just push the entry <file>=<package>
LI+=("$P")
else
# extract filename and packagename and concat them
# so each entry looks like <package>=<filename>
P1=`echo $P | sed 's/apk=/apk /g' | awk '{print $1}'`
P2=`echo $P | sed 's/apk=/apk /g' | awk '{print $2}'`
LI+=("$P2=$P1")
fi
done
rm -rf /tmp/pkgdata
touch /tmp/pkgdata
for P in "${LI[@]:0}"; do
echo "$P" >> /tmp/pkgdata
done
for P in `sort /tmp/pkgdata | grep -v SwiftBlack | grep -v SwiftDark`; do
if [ $PPATH == true ]; then
P1=`echo $P | sed 's/apk=/apk /g' | awk '{print $1}'`
P2=`echo $P | sed 's/apk=/apk /g' | awk '{print $2}' | sed -e 's/ //g'`
else
P1=`echo $P | sed 's%=/% /%g' | awk '{print $2}'`
P2=`echo $P | sed 's%=/% /%g' | awk '{print $1}' | sed -e 's/ //g'`
fi
VER=`adb shell dumpsys package $P2 | grep versionName | head -n 1 | sed -e 's/versionName=//g' | sed -e 's/ //g' | cut -c-15`
VERC=`adb shell dumpsys package $P2 | grep versionCode | head -n 1 | awk '{print $1}' | sed 's/versionCode=//g' | cut -c-15`
if [ $PPATH == true ]; then
# argument was not supplied, it means file name is before the = sign
printf "%-115s |%15s| %-s\n" "$P1" "$VER" "$P2"
else
printf "%-65s |%15s|%12s| %-10s\n" "$P2" "$VER" "($VERC)" "$P1"
fi
done
Run it from the linux command line with:
Code:
> apackages system > before-update
Then apply Google system update, then:
Code:
> apackages system > after-update
> tkdiff before-update after-update
Iḿ not a Windows guy, but I guess it is not so complicated to turn this into a .bat script which you can run from DOS/Powershell under Windows. You must have working adb though.
The script has some command line args:
Code:
system|user: filter on system packages or user packages
enabled|disabled: filter on packages which are enabled or disabled
pkg|path: outputs the path first or package name first
<string> script will filter packages that match the string (e.g. 'com.google.android' will filter those that have com.google.android in their package name)
Sample output (package name, version name, version code, path in Android file system):
Code:
com.android.ons | 12| (31)| /system/priv-app/ONS/ONS.apk
com.android.phone.auto_generated_rro_product__ | 1.0| (1)| /product/overlay/TeleService__auto_generated_rro_product.apk
com.android.phone.auto_generated_rro_vendor__ | 1.0| (1)| /vendor/overlay/TeleService__auto_generated_rro_vendor.apk
com.android.phone | 12| (31)| /system/priv-app/TeleService/TeleService.apk
com.android.printspooler | 12| (31)| /system/app/PrintSpooler/PrintSpooler.apk
com.android.providers.blockednumber | 12| (31)| /system/priv-app/BlockedNumberProvider/BlockedNumberProvider.apk
com.android.providers.calendar | 12| (31)| /system/priv-app/CalendarProvider/CalendarProvider.apk
com.android.providers.contacts.auto_generated_rro_product__ | 1.0| (1)| /product/overlay/ContactsProvider__auto_generated_rro_product.apk

foobar66 said:
It is actually a (reasonably) simple linux/bash script which I run before/after upgrade. Then do a 'tkdiff' (if you know what that means) to visualize the deltas. Source code (feel free to (re)use).
Code:
#!/bin/bash
display_usage() {
echo "usage: $0 [{system|user}] [{path|pkg}] [{disabled|enabled}] [<filter>] ($1)"
}
SCNT=0
UCNT=0
PACNT=0
PKCNT=0
DCNT=0
ECNT=0
# by default we put package in first column
PPATH=false
# FLAGS1 selects between user (-3) and system (-s)
FLAGS1=""
# FLAGS2 selects between disabled (-d) and enabled (-e)
FLAGS2=""
# by default there is no grep filter
FCNT=0
FILTER=0
while [[ $# -gt 0 ]]; do
case $1 in
"user")
if [ $SCNT -eq 1 ]; then
display_usage "'user' and 'system' cannot occur together on the command line"
exit 1
fi
if [ $UCNT -eq 0 ]; then
UCNT=$((UCNT + 1))
FLAGS1="-3"
else
if [ $UCNT -eq 1 ]; then
display_usage "'user' can only occur once on the command line"
exit 1
fi
fi
;;
"system")
if [ $UCNT -eq 1 ]; then
display_usage "'user' and 'system' cannot occur together on the command line"
exit 1
fi
if [ $SCNT -eq 0 ]; then
SCNT=$((SCNT + 1))
FLAGS1="-s"
else
if [ $SCNT -eq 1 ]; then
display_usage "'system' can only occur once on the command line"
exit 1
fi
fi
;;
"enabled")
if [ $DCNT -eq 1 ]; then
display_usage "'enabled' and 'disabled' cannot occur together on the command line"
exit 1
fi
if [ $ECNT -eq 0 ]; then
ECNT=$((ECNT + 1))
FLAGS2="-e"
else
if [ $ECNT -eq 1 ]; then
display_usage "'enabled' can only occur once on the command line"
exit 1
fi
fi
;;
"disabled")
if [ $ECNT -eq 1 ]; then
display_usage "'enabled' and 'disabled' cannot occur together on the command line"
exit 1
fi
if [ $DCNT -eq 0 ]; then
DCNT=$((DCNT + 1))
FLAGS2="-d"
else
if [ $DCNT -eq 1 ]; then
display_usage "'disabled' can only occur once on the command line"
exit 1
fi
fi
;;
"path")
if [ $PKCNT -eq 1 ]; then
display_usage "'path' and 'pkg' cannot occur together on the command line"
exit 1
fi
if [ $PACNT -eq 0 ]; then
PACNT=$((PACNT + 1))
PPATH=true
else
if [ $PACNT -eq 1 ]; then
display_usage "'path' can only occur once on the command line"
exit 1
fi
fi
;;
"pkg")
if [ $PACNT -eq 1 ]; then
display_usage "'path' and 'pkg' cannot occur together on the command line"
exit 1
fi
if [ $PKCNT -eq 0 ]; then
PKCNT=$((PKCNT + 1))
PPATH=false
else
if [ $PKCNT -eq 1 ]; then
display_usage "'ppk' can only occur once on the command line"
exit 1
fi
fi
;;
*)
if [ $FCNT -eq 1 ]; then
display_usage "there can only be 1 filter argument"
exit 1
fi
FCNT=$((FCNT + 1))
FILTER="$1"
;;
esac
shift
done
if [ $FCNT -eq 0 ]; then
pkg=$(adb shell pm list packages $FLAGS1 $FLAGS2 -f | colrm 1 8 | sort)
else
pkg=$(adb shell pm list packages $FLAGS1 $FLAGS2 -f | colrm 1 8 | grep "$FILTER" | sort)
fi
LI=()
for P in $pkg; do
if [ $PPATH == "true" ]; then
# just push the entry <file>=<package>
LI+=("$P")
else
# extract filename and packagename and concat them
# so each entry looks like <package>=<filename>
P1=`echo $P | sed 's/apk=/apk /g' | awk '{print $1}'`
P2=`echo $P | sed 's/apk=/apk /g' | awk '{print $2}'`
LI+=("$P2=$P1")
fi
done
rm -rf /tmp/pkgdata
touch /tmp/pkgdata
for P in "${LI[@]:0}"; do
echo "$P" >> /tmp/pkgdata
done
for P in `sort /tmp/pkgdata | grep -v SwiftBlack | grep -v SwiftDark`; do
if [ $PPATH == true ]; then
P1=`echo $P | sed 's/apk=/apk /g' | awk '{print $1}'`
P2=`echo $P | sed 's/apk=/apk /g' | awk '{print $2}' | sed -e 's/ //g'`
else
P1=`echo $P | sed 's%=/% /%g' | awk '{print $2}'`
P2=`echo $P | sed 's%=/% /%g' | awk '{print $1}' | sed -e 's/ //g'`
fi
VER=`adb shell dumpsys package $P2 | grep versionName | head -n 1 | sed -e 's/versionName=//g' | sed -e 's/ //g' | cut -c-15`
VERC=`adb shell dumpsys package $P2 | grep versionCode | head -n 1 | awk '{print $1}' | sed 's/versionCode=//g' | cut -c-15`
if [ $PPATH == true ]; then
# argument was not supplied, it means file name is before the = sign
printf "%-115s |%15s| %-s\n" "$P1" "$VER" "$P2"
else
printf "%-65s |%15s|%12s| %-10s\n" "$P2" "$VER" "($VERC)" "$P1"
fi
done
Run it from the linux command line with:
Code:
> apackages system > before-update
Then apply Google system update, then:
Code:
> apackages system > after-update
> tkdiff before-update after-update
Iḿ not a Windows guy, but I guess it is not so complicated to turn this into a .bat script which you can run from DOS/Powershell under Windows. You must have working adb though.
The script has some command line args:
Code:
system|user: filter on system packages or user packages
enabled|disabled: filter on packages which are enabled or disabled
pkg|path: outputs the path first or package name first
Sample output (package name, short version, long version, path in Android file system):
Code:
com.android.ons | 12| (31)| /system/priv-app/ONS/ONS.apk
com.android.phone.auto_generated_rro_product__ | 1.0| (1)| /product/overlay/TeleService__auto_generated_rro_product.apk
com.android.phone.auto_generated_rro_vendor__ | 1.0| (1)| /vendor/overlay/TeleService__auto_generated_rro_vendor.apk
com.android.phone | 12| (31)| /system/priv-app/TeleService/TeleService.apk
com.android.printspooler | 12| (31)| /system/app/PrintSpooler/PrintSpooler.apk
com.android.providers.blockednumber | 12| (31)| /system/priv-app/BlockedNumberProvider/BlockedNumberProvider.apk
com.android.providers.calendar | 12| (31)| /system/priv-app/CalendarProvider/CalendarProvider.apk
com.android.providers.contacts.auto_generated_rro_product__ | 1.0| (1)| /product/overlay/ContactsProvider__auto_generated_rro_product.apk
Click to expand...
Click to collapse
This is amazing. Love seeing this stuff. I'm not really a script type of guy like you (guy/girl you know what I mean)... but its great to see and totally intrests me.
so can you see a bunch of files that were changed? or I guess you would have to run the script before and after?
this command
tkdiff before-update after-update
for example - how does it find the exact files that were changed?

Alekos said:
This is amazing. Love seeing this stuff. I'm not really a script type of guy like you (guy/girl you know what I mean)... but its great to see and totally intrests me.
so can you see a bunch of files that were changed? or I guess you would have to run the script before and after?
this command
tkdiff before-update after-update
for example - how does it find the exact files that were changed?
Click to expand...
Click to collapse
See previous post. Indeed run the script before/after, pipe the output into a text file, then do a 'diff' on the before/after text file ... but maybe that sounds like chinese if you're not familiar with Linux ...
The script actually uses adb to shell into the Android device and use the package manager (pm shell command) on the device to 'dump' the package data. Then the script picks up the package name, version name, version code and file path.

foobar66 said:
See previous post. Indeed run the script before/after, pipe the output into a text file, then do a 'diff' on the before/after text file ... but maybe that sounds like chinese if you're not familiar with Linux ...
The script actually uses adb to shell into the Android device and use the package manager (pm shell command) on the device to 'dump' the package data. Then the script picks up the package name, version name, version code and file path.
Click to expand...
Click to collapse
yeah it is chinese to me lol. but its all good.
so how many times was the file com.google.mainline.telemetry" changed in December/January? 3 times for 3 updates but no date change?

Alekos said:
yeah it is chinese to me lol. but its all good.
so how many times was the file com.google.mainline.telemetry" changed in December/January? 3 times for 3 updates but no date change?
Click to expand...
Click to collapse
The previous Play-systemupdate update which I received (Jan 6) only updated com.google.android.modulemetadata.

Google Play Store 28.9.12-19 [0] [PR] 421882020 (nodpi) (Android 4.4+) APK Download by Google LLC - APKMirror
Google Play Store 28.9.12-19 [0] [PR] 421882020 (nodpi) (Android 4.4+) APK Download by Google LLC - APKMirror Free and safe Android APK downloads
www.apkmirror.com
EDIT: Nm wont work

Doug8796 said:
Google Play Store 28.9.12-19 [0] [PR] 421882020 (nodpi) (Android 4.4+) APK Download by Google LLC - APKMirror
Google Play Store 28.9.12-19 [0] [PR] 421882020 (nodpi) (Android 4.4+) APK Download by Google LLC - APKMirror Free and safe Android APK downloads
www.apkmirror.com
EDIT: Nm wont work
Click to expand...
Click to collapse
Mine says it's up to date but it's October

Interesting, mine says Jan 1, 2022.

Mine also says Jan 1, 2022 now

Related

Updated: expand initramfs ramdisc from zImage kernel, supports gzip, lzma, bzip2 (?)

If you are interested in building your own kernels (from the Samsung-released open-source code, or any other source), you may need to extract initramfs ramdiscs from existing kernels.
There is a well-known script to achieve that goal, but it only supports uncompressed and gzip'ed kernels, and it doesn't unpack the CPIO archive for further inspection of the actual initramfs "source code" (the output trace is also not easy to debug when working with "weird" zImages). The original script is explained in the XDA wiki: http://forum.xda-developers.com/wiki/index.php?title=Extract_initramfs_from_zImage.
For my personal convenience, I tweaked the original bash script so I thought I'd share it with the XDA devs. I added support for lzma-compressed initramfs ramdiscs (thanks to koxudaxi for reminding me of the lzma "magic string"), please let me know if you know the "magic string" for bzip2 archives (EDIT: "0x314159265359" 6 bytes "start of block", 4 bytes header at the beginning...experimental untested support is now available in the script below).
Note that the latest Samfirmware ROMs include encrypted boot.bin and Sbl.bin bootloaders, but I'm not sure how the zImage kernels are encoded...so this script may not work.
Also note that zImage files patched with z4mod require further decoding work, see the XDA wiki page mentioned above for instructions.
Code:
#!/bin/bash
zImage=$1
read -rp "Enter any text to skip extraction (assumes /tmp/kernel2.img already exists): " input
if [ ${input}" " = " " ]; then
echo "==> deleting /tmp/kernel1.img"
rm /tmp/kernel1.img
echo "==> deleting /tmp/kernel2.img"
rm /tmp/kernel2.img
echo "==> searching for gzip header in $zImage"
skip=`grep -P -a -b -m 1 --only-matching $'\x1F\x8B\x08' $zImage | cut -f 1 -d :`
echo "==> found gzip header at $skip"
echo "==> unzipping $zImage to /tmp/kernel1.img"
dd if=$zImage bs=1 skip=$skip | gunzip > /tmp/kernel1.img
echo "==> searching for gzip header in /tmp/kernel1.img"
poszip=`grep -P -a -b -m 1 --only-matching $'\x1F\x8B\x08' /tmp/kernel1.img | cut -f 1 -d :`
if [ ! $poszip = "" ]; then
echo "==> gzip header at $poszip in /tmp/kernel1.img"
echo "==> extracting /tmp/kernel2.img from /tmp/kernel1.img using gunzip"
dd if=/tmp/kernel1.img bs=1 skip=$poszip | gunzip > /tmp/kernel2.img
else
echo "==> no gzip header in /tmp/kernel1.img"
echo "==> searching for lzma header in /tmp/kernel1.img"
poslzma=`grep -P -a -b -m 1 --only-matching '\x{5D}\x{00}\x..\x{FF}\x{FF}\x{FF}\x{FF}\x{FF}\x{FF}' /tmp/kernel1.img | cut -f 1 -d :`
if [ ! $poslzma = "" ]; then
echo "==> lzma header at $poslzma in /tmp/kernel1.img"
echo "==> extracting /tmp/kernel2.img from /tmp/kernel1.img using lzma"
dd if=/tmp/kernel1.img bs=1 skip=$poslzma | unlzma > /tmp/kernel2.img
else
echo "==> no lzma header in /tmp/kernel1.img"
echo "==> searching for bzip2 header in /tmp/kernel1.img"
posbzip2=`grep -P -a -b -m 1 --only-matching $'\x{42}\x{5A}\x{68}\x{39}\x{31}\x{41}\x{59}\x{26}\ x{53}\x{59}' /tmp/kernel1.img | cut -f 1 -d :`
if [ ! $posbzip2 = "" ]; then
echo "==> bzip2 header at $posbzip2 in /tmp/kernel1.img"
posbzip2=$((posbzip2 - 4))
echo "==> adjusted bzip2 header with -4 bytes offset: $posbzip2"
echo "==> extracting /tmp/kernel2.img from /tmp/kernel1.img using bzip2"
dd if=/tmp/kernel1.img bs=1 skip=$posbzip2 | bunzip2 > /tmp/kernel2.img
else
echo "==> no bzip2 header in /tmp/kernel1.img"
echo "==> assuming no compression for /tmp/kernel1.img, copying to /tmp/kernel2.img"
cp /tmp/kernel1.img /tmp/kernel2.img
fi
fi
fi
fi
# '070701' == $'\x30\x37\x30' == '\x{30}\x{37}\x{30}'
echo "==> searching for cpio header in /tmp/kernel2.img"
start=`grep -a -b -m 1 --only-matching '070701' /tmp/kernel2.img | head -1 | cut -f 1 -d :`
echo "==> cpio header at $start in /tmp/kernel2.img"
echo "==> searching for cpio footer in /tmp/kernel2.img"
end=`grep -a -b -m 1 --only-matching 'TRAILER!!!' /tmp/kernel2.img | head -1 | cut -f 1 -d :`
echo "==> cpio footer at $end in /tmp/kernel2.img"
# 14 bytes = length of "TRAILER!!!" (zero-terminated string) + padding => fixes premature end of file warning in CPIO
end=$((end + 14))
echo "==> adjusted cpio footer with 14 bytes offset: $end"
count=$((end - start))
echo "==> cpio size is $count bytes ($end - $start)"
if (($count < 0)); then
echo "==> error in cpio positions, aborting"
exit
fi
cpio_file="initramfs.cpio"
cpio_dir=`echo "${cpio_file}.expanded"`
cpio_ls=`echo "${cpio_file}.ls"`
echo "==> deleting ${zImage}_${cpio_file}"
rm ${zImage}_${cpio_file}
echo "==> deleting ${zImage}_${cpio_dir}"
rm -r ${zImage}_${cpio_dir}
echo "==> deleting ${zImage}_${cpio_ls}"
rm -r ${zImage}_${cpio_ls}
echo "==> extracting initramfs ramdisc from /tmp/kernel2.img to ${zImage}_${cpio_file}"
dd if=/tmp/kernel2.img bs=1 skip=$start count=$count > ${zImage}_${cpio_file}
echo "==> expanding ${zImage}_${cpio_file} into ${zImage}_${cpio_dir} directory"
mkdir ${zImage}_${cpio_dir}
curdir=`pwd`
(cd ${zImage}_${cpio_dir} && cpio --quiet -id --no-absolute-filenames < ${curdir}/${zImage}_${cpio_file})
echo "==> generating ls-like file list in ${zImage}_${cpio_ls}"
cpio --quiet -tvnF ${zImage}_${cpio_file} > ${zImage}_${cpio_ls}
echo "==> DONE."
- heads-up - nice rewrite/cleanup by Mistadman:
https://github.com/mistadman/Extract-Kernel-Initramfs/

Hangouts Takeout - need example datasets (script for pseudonymization inside)

Hey there,
I'm currently working on an app to export data from Google Hangouts using the Takeouts JSON file.
Unfortunately I myself have not been using Hangouts TOO thoroughly, soo I need some more example datasets from other users.
If you want to help me, head over to https://www.google.com/settings/takeout#custom:chat and get a copy of your chat history.
Then you can use the following script to anonymize your data. As I can only anonymize data I know of, PLEASE go through the file afterwards and take a look if some information leaked before sending it to me.
If you find data that is not anonymized by the script, please give me appropriate feedback!
Code:
#!/bin/bash
FILE="Hangouts.json"
cp $FILE "$FILE.pseudo"
FILE="$FILE.pseudo"
function randstr(){
echo `perl -e 'printf "%08X\n", rand(0xffffffff);'`
}
O=$IFS
IFS=$(echo -en "\n\b")
#pseudonymize all gaia_ids (and chat_ids of the same value)
GAIA_IDS=`perl -ne '/"gaia_id" : "(?!pseudo:)(.*)"/ and print $1."\n"' $FILE | sort | uniq`
for ID in $GAIA_IDS; do
PSEUDO="pseudo:"`randstr`
perl -pi -e "s/\"$ID\"/\"$PSEUDO\"/g" $FILE
done;
#as far as I've seen gaia_id equals chat_id, but if that's not always the case, let's pseudonymize those, too
CHAT_IDS=`perl -ne '/"chat_id" : "(?!pseudo:)(.*)"/ and print $1."\n"' $FILE | sort | uniq`
for ID in $CHAT_IDS; do
PSEUDO="pseudo:"`randstr`
perl -pi -e "s/\"$ID\"/\"$PSEUDO\"/g" $FILE
done;
FALLBACK_NAMES=`perl -ne '/"fallback_name" : "(?!pseudoname:)(.*)"/ and print $1."\n"' $FILE | sort | uniq`
for ID in $FALLBACK_NAMES; do
PSEUDO="pseudoname:"`randstr`
perl -pi -e "s/\"$ID\"/\"$PSEUDO\"/g" $FILE
done;
perl -pi -e 's/"(text|display_url|link_target|url|image_url)"\s*:\s*".*"/"$1" : "ANONYMIZED_DATA"/g' $FILE
IFS=$O
Thanks everyone!

99swap doesnt run from init.d

I am on MIUI ICS v4.
I have 99swap in system/etc/init.d
I have the .swapfile in /scdard/.swapfile
..the problem is.. I have to manualy activate Swapfile everytime I reboot.. why is the script not working.. when I was on MIUI v5 by maxworks as well same like v4.. it used to work correct..
I have given the system.. the etc.. and init.d folder all access. Read.Write.Execute
Below is MIUI v5 Script that used to work when I used that ROM.
#!/system/bin/sh
#Created by neamv for maxworks. All rights reserved
filename=/sdcard/.swapfile
fsize=256
recreate_on_boot=1
#sleep=120
timeout=240
while [ -z "`mount | grep "sdcard0 "`" ]; do
[ $timeout -lt 0 ] && exit 0
timeout=$(($timeout-10))
sleep 10
done
[ -n "`mount | grep "sdcard .*ntfs"`" ] && exit 0
if [ "$recreate_on_boot" == 1 ]; then
dd if=/dev/zero of=$filename"_new" bs=1024 count=$(($fsize*1024)) && mkswap $filename"_new" && mv $filename"_new" $filename
else
[ -f $filename ] && [ `stat -t $filename | awk '{print ($2)}'` -ne $(($fsize*1024*1024)) ] && rm $filename
[ ! -f $filename ] && dd if=/dev/zero of=$filename bs=1024 count=$(($fsize*1024)) && mkswap $filename
fi
swapon $filename
and below now is v4 script that doesn't work
#!/sbin/sh
#Created by neamv for maxworks. All rights reserved
filename=/sdcard/.swapfile
fsize=256
recreate_on_boot=1
timeout=240
while [ -z "`mount | grep "sdcard "`" ]; do
[ $timeout -lt 0 ] && exit 0
timeout=$(($timeout-10))
sleep 10
done
[ -n "`mount | grep "sdcard .*ntfs"`" ] && exit 0
if [ "$recreate_on_boot" == 1 ]; then
dd if=/dev/zero of=$filename"_new" bs=1024 count=$(($fsize*1024)) && mkswap $filename"_new" && mv $filename"_new" $filename
else
[ -f $filename ] && [ `stat -t $filename | awk '{print ($2)}'` -ne $(($fsize*1024*1024)) ] && rm $filename
[ ! -f $filename ] && dd if=/dev/zero of=$filename bs=1024 count=$(($fsize*1024)) && mkswap $filename
fi
swapon $filename
I didn't want to mess my phone.. so I thougt to ask. Plz automate the process of the Swapfile getting loaded after reboot.. it actually should be created on every boot at a different place in the SD-Card.. this is what I read from Maxworks.
Edit.. One more Question.. If I can.. to make my phone fun faster.. how large should I create the .swapfile.. lets say.. 512MB ?? 1 gb ?? and how to set the swappines.. (and no.. I don't want to use Swapper2)
BUMP
Well, it should work, but may be caused by extensive brake swap. Try chaging the swap size
You can edit the file / system/etc/init.d/99swap replacing in fsize 256 to 64 for example.
saqibkhan said:
I am on MIUI ICS v4.
I have 99swap in system/etc/init.d
I have the .swapfile in /scdard/.swapfile
..the problem is.. I have to manualy activate Swapfile everytime I reboot.. why is the script not working.. when I was on MIUI v5 by maxworks as well same like v4.. it used to work correct..
I have given the system.. the etc.. and init.d folder all access. Read.Write.Execute
Below is MIUI v5 Script that used to work when I used that ROM.
#!/system/bin/sh
#Created by neamv for maxworks. All rights reserved
filename=/sdcard/.swapfile
fsize=256
recreate_on_boot=1
#sleep=120
timeout=240
while [ -z "`mount | grep "sdcard0 "`" ]; do
[ $timeout -lt 0 ] && exit 0
timeout=$(($timeout-10))
sleep 10
done
[ -n "`mount | grep "sdcard .*ntfs"`" ] && exit 0
if [ "$recreate_on_boot" == 1 ]; then
dd if=/dev/zero of=$filename"_new" bs=1024 count=$(($fsize*1024)) && mkswap $filename"_new" && mv $filename"_new" $filename
else
[ -f $filename ] && [ `stat -t $filename | awk '{print ($2)}'` -ne $(($fsize*1024*1024)) ] && rm $filename
[ ! -f $filename ] && dd if=/dev/zero of=$filename bs=1024 count=$(($fsize*1024)) && mkswap $filename
fi
swapon $filename
and below now is v4 script that doesn't work
#!/sbin/sh
#Created by neamv for maxworks. All rights reserved
filename=/sdcard/.swapfile
fsize=256
recreate_on_boot=1
timeout=240
while [ -z "`mount | grep "sdcard "`" ]; do
[ $timeout -lt 0 ] && exit 0
timeout=$(($timeout-10))
sleep 10
done
[ -n "`mount | grep "sdcard .*ntfs"`" ] && exit 0
if [ "$recreate_on_boot" == 1 ]; then
dd if=/dev/zero of=$filename"_new" bs=1024 count=$(($fsize*1024)) && mkswap $filename"_new" && mv $filename"_new" $filename
else
[ -f $filename ] && [ `stat -t $filename | awk '{print ($2)}'` -ne $(($fsize*1024*1024)) ] && rm $filename
[ ! -f $filename ] && dd if=/dev/zero of=$filename bs=1024 count=$(($fsize*1024)) && mkswap $filename
fi
swapon $filename
I didn't want to mess my phone.. so I thougt to ask. Plz automate the process of the Swapfile getting loaded after reboot.. it actually should be created on every boot at a different place in the SD-Card.. this is what I read from Maxworks.
Edit.. One more Question.. If I can.. to make my phone fun faster.. how large should I create the .swapfile.. lets say.. 512MB ?? 1 gb ?? and how to set the swappines.. (and no.. I don't want to use Swapper2)
Click to expand...
Click to collapse

[SCRIPT][BACKUP][TOOL]Preserve addon , dpi , Xposed app_process /system files

Hi,
i flash many roms and sometimes after new rom flashed , i see dpi preserved my change before flash, even some rom preserve xposed framework still activated...maybe you have experience with some other backup/restore /system files during flash, maybe have you another idea to preserve some stuff.
For my part, i make a new backuptool.sh and backuptool.functions scripts compiled with some i find over roms i tried....
We have:
save dpi
save xposed framework
save addond
i think in red are the line you can personalize, i hope you know what to do with.
backuptool.sh
Code:
#!/sbin/sh
#
# Backup and restore addon /system files
#
export C=/tmp/backup
export S=/system
[COLOR="Red"]export V=what you want[/COLOR]
persist_props="ro.sf.lcd_density"
sysroot="/system"
saveroot="/tmp/save"
# Preserve DPI
save_props()
{
rm -f "$saveroot/prop"
for prop in $persist_props; do
echo "save_props: $prop"
grep "^$prop=" "$sysroot/build.prop" >> "$saveroot/prop"
done
}
# Restore DPI
restore_props()
{
local sedargs
sedargs="-i"
for prop in $(cat $saveroot/prop); do
echo "restore_props: $prop"
k=$(echo $prop | cut -d'=' -f1)
sedargs="$sedargs s/^$k=.*/$prop/"
done
sed $sedargs "$sysroot/build.prop"
}
# Backup Xposed Framework (bin/app_process)
xposed_backup()
{
if [ -f /system/bin/app_process.orig ]
then
cp /system/bin/app_process /tmp/backup/
fi
}
# Restore Xposed Framework (bin/app_process)
xposed_restore()
{
if [ -f /tmp/backup/app_process ]
then
mv /system/bin/app_process /system/bin/app_process.orig
cp /tmp/backup/app_process /system/bin/
fi
}
# Preserve /system/addon.d in /tmp/addon.d
preserve_addon_d() {
mkdir -p /tmp/addon.d/
cp -a /system/addon.d/* /tmp/addon.d/
chmod 755 /tmp/addon.d/*.sh
}
# Restore /system/addon.d in /tmp/addon.d
restore_addon_d() {
cp -a /tmp/addon.d/* /system/addon.d/
rm -rf /tmp/addon.d/
}
[COLOR="Red"]# Proceed only if /system is the expected major and minor version
check_prereq() {
if ( ! grep -q "^ro.cm.version=$V.*" /system/build.prop ); then
echo "Not backing up files from incompatible version: $V"
return 0
fi
return 1
}[/COLOR]
check_blacklist() {
if [ -f /system/addon.d/blacklist ];then
## Discard any known bad backup scripts
cd /$1/addon.d/
for f in *sh; do
s=$(md5sum $f | awk {'print $1'})
grep -q $s /system/addon.d/blacklist && rm -f $f
done
fi
}
check_whitelist() {
found=0
if [ -f /system/addon.d/whitelist ];then
## forcefully keep any version-independent stuff
cd /$1/addon.d/
for f in *sh; do
s=$(md5sum $f | awk {'print $1'})
grep -q $s /system/addon.d/whitelist
if [ $? -eq 0 ]; then
found=1
else
rm -f $f
fi
done
fi
return $found
}
mkdir -p $saveroot
# Execute /system/addon.d/*.sh scripts with $1 parameter
run_stage() {
for script in $(find /tmp/addon.d/ -name '*.sh' |sort -n); do
$script $1
done
}
case "$1" in
backup)
save_props
mkdir -p $C
[COLOR="Red"]# if check_prereq; then[/COLOR]
if check_whitelist system; then
exit 127
fi
[COLOR="Red"]# fi[/COLOR]
check_blacklist system
xposed_backup
preserve_addon_d
run_stage pre-backup
run_stage backup
run_stage post-backup
;;
restore)
restore_props
[COLOR="Red"]# if check_prereq; then[/COLOR]
if check_whitelist tmp; then
exit 127
fi
[COLOR="Red"]# fi[/COLOR]
check_blacklist tmp
xposed_restore
run_stage pre-restore
run_stage restore
run_stage post-restore
restore_addon_d
rm -rf $C
rm -rf /data/data/android.pacstats
sync
;;
*)
echo "Usage: $0 {backup|restore}"
exit 1
esac
exit 0
backuptool.functions
Code:
#!/sbin/sh
#
# Functions for backuptool.sh
#
export C=/tmp/backup
export S=/system
export V=what you want
backup_file() {
if [ -e "$1" ]; then
local F=`basename "$1"`
local D=`dirname "$1"`
# dont backup any apps that have odex files, they are useless
if ( echo "$F" | grep -q "\.apk$" ) && [ -e `echo "$1" | sed -e 's/\.apk$/\.odex/'` ]; then
echo "Skipping odexed apk $1";
else
mkdir -p "$C/$D"
cp -p $1 "$C/$D/$F"
fi
fi
}
restore_file() {
local FILE=`basename "$1"`
local DIR=`dirname "$1"`
if [ -e "$C/$DIR/$FILE" ]; then
if [ ! -d "$DIR" ]; then
mkdir -p "$DIR";
fi
cp -p "$C/$DIR/$FILE" "$1";
if [ -n "$2" ]; then
echo "Deleting obsolete file $2"
rm "$2";
fi
fi
}
the files in attachments. just remove ".txt' at end to use them as well.
thanks.

n00b build issues...

Hi all,
Can anyone help me out with info on how to solve this?
Code:
[ 84% 103/122] ----- Making uncompressed recovery ramdisk ------
cp: cannot stat '/android-dev/android/lineage/out/target/product/cepheus/root/init.recovery.*.rc': No such file or directory
[ 85% 104/122] ----- Making compressed recovery ramdisk ------
[ 86% 105/122] ----- Making recovery image ------
[ 86% 106/122] Target build info: /android-dev/android/lineage/out/target/product/cepheus/system/build.prop
[ 87% 107/122] build /android-dev/android/lineage/out/target/product/cepheus/obj/NOTICE.xml
[ 88% 108/122] build /android-dev/android/lineage/out/target/product/cepheus/obj/NOTICE.xml.gz
[ 89% 109/122] build /android-dev/android/lineage/out/target/product/cepheus/system/etc/NOTICE.xml.gz
[ 90% 110/122] build /android-dev/android/lineage/out/target/product/cepheus/obj/NOTICE_VENDOR.xml
[ 90% 111/122] build /android-dev/android/lineage/out/target/product/cepheus/obj/NOTICE_VENDOR.xml.gz
[ 91% 112/122] build /android-dev/android/lineage/out/target/product/cepheus/vendor/etc/NOTICE.xml.gz
[ 92% 113/122] Installed file list: /android-dev/android/lineage/out/target/product/cepheus/installed-files-vendor.txt
[ 93% 114/122] Installed file list: /android-dev/android/lineage/out/target/product/cepheus/installed-files.txt
[ 94% 115/122] Target system fs image: /android-dev/android/lineage/out/target/product/cepheus/obj/PACKAGING/systemimage_intermediates/system.img
FAILED: /android-dev/android/lineage/out/target/product/cepheus/obj/PACKAGING/systemimage_intermediates/system.img
/bin/bash -c "(if [ -d /android-dev/android/lineage/out/target/product/cepheus/system/vendor ] && [ ! -h /android-dev/android/lineage/out/target/product/cepheus/system/vendor ]; then echo 'Non-symlink /android-dev/android/lineage/out/target/product/cepheus/system/vendor detected!' 1>&2; echo 'You cannot install files to /android-dev/android/lineage/out/target/product/cepheus/system/vendor while building a separate vendor.img!' 1>&2; exit 1; fi ) && (ln -sf /vendor /android-dev/android/lineage/out/target/product/cepheus/system/vendor ) && (mkdir -p /android-dev/android/lineage/out/target/product/cepheus/obj/PACKAGING/systemimage_intermediates/ /android-dev/android/lineage/out/target/product/cepheus/obj/PACKAGING/systemimage_intermediates && rm -rf /android-dev/android/lineage/out/target/product/cepheus/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"ext_mkuserimg=mkuserimg_mke2fs.sh\" >> /android-dev/android/lineage/out/target/product/cepheus/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"fs_type=ext4\" >> /android-dev/android/lineage/out/target/product/cepheus/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"system_size=3758096384\" >> /android-dev/android/lineage/out/target/product/cepheus/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"extfs_sparse_flag=-s\" >> /android-dev/android/lineage/out/target/product/cepheus/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"squashfs_sparse_flag=-s\" >> /android-dev/android/lineage/out/target/product/cepheus/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"selinux_fc=/android-dev/android/lineage/out/target/product/cepheus/obj/ETC/file_contexts.bin_intermediates/file_contexts.bin\" >> /android-dev/android/lineage/out/target/product/cepheus/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"avb_avbtool=avbtool\" >> /android-dev/android/lineage/out/target/product/cepheus/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"avb_system_hashtree_enable=true\" >> /android-dev/android/lineage/out/target/product/cepheus/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"avb_system_add_hashtree_footer_args=--setup_as_rootfs_from_kernel\" >> /android-dev/android/lineage/out/target/product/cepheus/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"avb_vendor_hashtree_enable=true\" >> /android-dev/android/lineage/out/target/product/cepheus/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"avb_vendor_add_hashtree_footer_args=\" >> /android-dev/android/lineage/out/target/product/cepheus/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"avb_product_hashtree_enable=true\" >> /android-dev/android/lineage/out/target/product/cepheus/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"avb_product_add_hashtree_footer_args=\" >> /android-dev/android/lineage/out/target/product/cepheus/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"system_root_image=true\" >> /android-dev/android/lineage/out/target/product/cepheus/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"root_dir=/android-dev/android/lineage/out/target/product/cepheus/root\" >> /android-dev/android/lineage/out/target/product/cepheus/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (echo \"skip_fsck=true\" >> /android-dev/android/lineage/out/target/product/cepheus/obj/PACKAGING/systemimage_intermediates/system_image_info.txt ) && (PATH=/android-dev/android/lineage/out/host/linux-x86/bin/:\$PATH build/make/tools/releasetools/build_image.py /android-dev/android/lineage/out/target/product/cepheus/system /android-dev/android/lineage/out/target/product/cepheus/obj/PACKAGING/systemimage_intermediates/system_image_info.txt /android-dev/android/lineage/out/target/product/cepheus/obj/PACKAGING/systemimage_intermediates/system.img /android-dev/android/lineage/out/target/product/cepheus/system /android-dev/android/lineage/out/target/product/cepheus/obj/PACKAGING/systemimage_intermediates/generated_system_image_info.txt || ( mkdir -p /android-dev/android/lineage/out/dist; cp /android-dev/android/lineage/out/target/product/cepheus/installed-files.txt /android-dev/android/lineage/out/dist/installed-files-rescued.txt; exit 1 ) )"
Non-symlink /android-dev/android/lineage/out/target/product/cepheus/system/vendor detected!
You cannot install files to /android-dev/android/lineage/out/target/product/cepheus/system/vendor while building a separate vendor.img!
[ 95% 116/122] Target vendor fs image: /android-dev/android/lineage/out/target/product/cepheus/vendor.img
[ 95% 117/122] Construct recovery from boot
ninja: build stopped: subcommand failed.
14:51:04 ninja failed with: exit status 1
Thanks in advance
MWPau said:
Hi all, Can anyone help me out with info on how to solve this?.........
Click to expand...
Click to collapse
If this is regarding an issue building a LineageOS Firmware ROM, there's a bunch of Guides, Tutorials, etc... regarding this topic on the Forum.
The following are just 2 examples of them that looks pretty active too.
https://forum.xda-developers.com/showthread.php?t=3551484
https://forum.xda-developers.com/showthread.php?t=2814763
Good Luck!
~~~~~~~~~~~~~~~
Unless asked to do so, PLEASE don't PM me regarding support. Sent using The ClaRetoX Forum App on my Apple Macintosh.

Categories

Resources