problem with addon.d - LineageOS Questions & Answers

i added
/system/vendor/etc/init/hw/init.qcom.power.rc
to /system/addon.d/50.-lineage.sh
Code:
#!/sbin/sh
#
# ADDOND_VERSION=2
#
# /system/addon.d/50-lineage.sh
# During a LineageOS 15.1 upgrade, this script backs up /system/etc/hosts,
# /system is formatted and reinstalled, then the file is restored.
#
. /tmp/backuptool.functions
list_files() {
cat <<EOF
etc/hosts
vendot/etc/init/hw/init.qcom.power.rc
EOF
}
case "$1" in
backup)
list_files | while read FILE DUMMY; do
backup_file $S/"$FILE"
done
;;
restore)
list_files | while read FILE REPLACEMENT; do
R=""
[ -n "$REPLACEMENT" ] && R="$S/$REPLACEMENT"
[ -f "$C/$S/$FILE" ] && restore-file "$R" $S/"$FILE"
done
;;
pre-backup)
# Stub
;;
post-backup)
# Stub
;;
pre-restore)
# Stub
;;
post-restore)
# Stub
;;
esac
after updating lineage
/system/vendor/etc/init/hw/init.qcom.power.rc
was restored and readable
but it 's size was showing as 0kb
and it was not excuted

@osm0sis has made a good add-on.d script.

Related

[VRTHEME][JB 4.1.2 LSx] Change updater-script & installtheme.sh [FOR 2dn ROM Only]

[VRTHEME][JB 4.1.2 LSx] Change updater-script & installtheme.sh [FOR 2dn ROM Only]
VRTHEME FILES for 2ND ROM ONLY
Original user of S2 I9100 JB 4.1.2 ROM on 2ND ROM, i also want to use Themes and Mods for JB 4.1.2 LSx ROM i found on XDA I9100 threads.
Most are based on http://forum.xda-developers.com/showthread.php?t=1207017 .
To flash them on 2nd ROM, again we have to re-script updater-script and installtheme.sh scripts.
REMEMBER, when we use a 4.1.2 JB ROM as second rom, most of the files which are in /preload/symlink/system/app/* are finaly placed in /data/sec_data/*
so we have to use this PATH in updater-script and installtheme.sh .
In most of the themed ZIP original file we find on XDA, some apks system are in /system/app or /preload/symlink/system/app , be carrefull of this,
in VR-Themed ZIP file we want to moddify for 2nd ROM , sometimes, we have to move /preload/symlink/system/app/xxxxxxxx.apk in /vrtheme/system/app/xxxxxxxx.apk before using it.
so, about using the original VR-Theme or VR-Mod zipped files found on XDA, my different purposes for theming are :
if system files are in /preload/symlink/system/app , they will be themed in /data/sec_data
if system files are in /preload/symlink/system/app , they will be themed in /preload/symlink/system/app (if you use on 1rst ROM)
if system files are in /system/app , they will be themed if they are in /system/app or /data/sec_data/ or /preload/symlink/system/app too
At my sens, the only way to have an error is to put some xxxxxxx.apk folders in /vrtheme/system/app/
which are in fact LNs files in /system/app/ on TEL, (in 2nd ROM, partition /system/ = /preload/ !)
Another way to undertand it, it's that there is no way to destroy symlinked files in /system/app/* (on tel) because no files from /vrtheme/system/app are unknow from you, (the only files we find in are managed by you, by deplacing some themed xxxxxxxx.apk folder from /preload/symplink/system/app, because ROM on TELhave on 2nd ROM too. On another terms too, we can manage apks systems files in /data/sec_data/* instead of /system/app/* (preload/app/*) so only xxxxxxxx.apk directories which are volontary in /vrtheme/system/app/* would be themed in /system/app/ on your 2nd ROM.
for example, flashbarservice.apk can be found sometimes in/system/app and sometimes in /data/sec_data/
Anyway you have to ALWAYS verify the xxxxxxxx.apk directories placement in the Original ZIP Theme or Mod file before flashing it
i think my updater-script and installtheme.sh are also fonctional for apks in /data/app/
Remember that generaly, a file xxxxxxxx.apk is patched on phone only if it exist a ZIP folder named xxxxxxxx.apk in /vrtheme/system/app/, /vrtheme/system/framework/, /vrtheme/preload/symlink/system/app/, /vrtheme/data/app or now /vrtheme/data/sec_data/ , and in the TEL, in /system/app/ , /preload/symlink/system/app/ , /system/framework/ , /data/app/ and /data/sec_data/
Give a try on my sample MIX here : https://mega.co.nz/#F!bhww0QYT!L2cnHS84iZJC7aCvdTmFjg
updater-script and installtheme.sh in attachments are to replace those in your original theme or mod files you find , at the same place which there are , to avoid the desired theme or mod in your 2nd ROM.
(delete ".pdf" at the of name file to use it)
i try to be explicit as i can with my (very limited) bad school english
Thanks.
New Update V2 version of this particular updater-script, only for file which are in \vrtheme\data\sec_data\, (and usual \vrtheme\system\app\ and \vrtheme\system\framework\ for sure)
Version before managed \vrtheme\preload\symlink\system\app\ so it was a waste of space in sdcard, i reduce that because THIS IS only for second rom usage, so update if you use.
lines from new updater-script :
package_extract_dir("vrtheme/data/app", "/sdcard/vrtheme/data/app");
package_extract_dir("vrtheme/data/sec_data", "/sdcard/vrtheme/data/sec_data");
package_extract_dir("vrtheme/system/app", "/sdcard/vrtheme/system/app");
package_extract_dir("vrtheme/system/framework", "/sdcard/vrtheme/system/framework");
NO PRELOD here.
Thanks
toolpack and how to for 2nd ROM ONLY
hope it's the best how too i post for adapt mod and vrtheme for 2nd ROM use !
{
"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"
}
updater-script details :
HTML:
ui_print("");
ui_print(" Mounting Filesystems... ");
mount("ext4", "EMMC", "/dev/block/mmcblk0p9", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p10", "/data");
mount("ext4", "EMMC", "/dev/block/mmcblk0p7", "/cache");
mount("ext4", "EMMC", "/dev/block/mmcblk0p12", "/preload");
ui_print("");
ui_print(" Clearing dalvik-cache... ");
delete_recursive("/data/dalvik-cache");
ui_print("");
ui_print(" Flashing new extra files before vrtheme them... ");
package_extract_dir("system/app", "/system/app");
package_extract_dir("data/sec_data", "/data/sec_data");
package_extract_file("vrtheme/symlink_data-data_sec_to_system_app", "/tmp/symlink_data-data_sec_to_system_app");
set_perm(0, 0, 0777, "/tmp/symlink_data-data_sec_to_system_app");
run_program("/tmp/symlink_data-data_sec_to_system_app");
set_perm_recursive(0, 0, 0755, 0644, "/data/sec_data");
ui_print("......extracting.vrtheme.to.sdcard.....");
package_extract_dir("vrtheme/data/app", "/sdcard/vrtheme/data/app");
package_extract_dir("vrtheme/data/sec_data", "/sdcard/vrtheme/data/sec_data");
package_extract_dir("vrtheme/system/app", "/sdcard/vrtheme/system/app");
package_extract_dir("vrtheme/system/framework", "/sdcard/vrtheme/system/framework");
ui_print("......extracting.files.to.work.....");
package_extract_file("vrtheme/installtheme.sh", "/sdcard/vrtheme/installtheme.sh");
package_extract_file("vrtheme/cleanup.sh", "/sdcard/vrtheme/cleanup.sh");
package_extract_file("vrtheme/zipalign", "/sdcard/vrtheme/zipalign");
package_extract_file("vrtheme/zip", "/sdcard/vrtheme/zip");
set_perm(0, 0, 0755, "/sdcard/vrtheme/installtheme.sh");
set_perm(0, 0, 0755, "/sdcard/vrtheme/cleanup.sh");
set_perm(0, 0, 0755, "/sdcard/vrtheme/zipalign");
set_perm(0, 0, 0755, "/sdcard/vrtheme/zip");
ui_print("..now.patching.with.installthem.sh....");
run_program("/sdcard/vrtheme/installtheme.sh");
ui_print(" Cleaning up... ");
run_program("/sdcard/vrtheme/cleanup.sh");
run_program("/sbin/umount", "/system");
run_program("/sbin/umount", "/data");
run_program("/sbin/umount", "/cache");
run_program("/sbin/umount", "/preload");
Installtheme.sh detail :
HTML:
#!/sbin/sh
# Copyright VillainROM 2011. All Rights Reserved
# cleanup from last time
[ -d /sdcard/vrtheme-backup ] && rm -r /sdcard/vrtheme-backup
# we need to first go through each file in the "app" folder, and for each one present, apply the modified theme to the APK
# let us copy each original APK here first.
echo "Processing /system/app/"
busybox mkdir -p /sdcard/vrtheme-backup/system/app
busybox mkdir -p /sdcard/vrtheme/apply/system/app
cd /sdcard/vrtheme/system/app/
for f in $(ls)
do
echo "Processing $f"
cp /system/app/$f /sdcard/vrtheme/apply/system/app/
cp /system/app/$f /sdcard/vrtheme-backup/system/app/
done
echo "Backups done for system apps"
# repeat for /preload/symlink/system/app now
[ -d /sdcard/vrtheme/preload/symlink/system/app ] && preload=1 || preload=0
if [ "$preload" -eq "1" ]; then
echo "Processing /preload/symlink/system/app/"
busybox mkdir -p /sdcard/vrtheme-backup/preload/symlink/system/app
busybox mkdir -p /sdcard/vrtheme/apply/preload/symlink/system/app
cd /sdcard/vrtheme/preload/symlink/system/app/
for f in $(ls)
do
echo "Processing $f"
cp /preload/symlink/system/app/$f /sdcard/vrtheme/apply/preload/symlink/system/app/
cp /preload/symlink/system/app/$f /sdcard/vrtheme-backup/preload/symlink/system/app/
done
echo "Backups done for preload apps"
fi
# repeat for /system/framework now
[ -d /sdcard/vrtheme/system/framework ] && framework=1 || framework=0
if [ "$framework" -eq "1" ]; then
echo "Processing /system/framework"
busybox mkdir -p /sdcard/vrtheme-backup/system/framework
busybox mkdir -p /sdcard/vrtheme/apply/system/framework
cd /sdcard/vrtheme/system/framework
for f in $(ls)
do
echo "Processing $f"
cp /system/framework/$f /sdcard/vrtheme/apply/system/framework/
cp /system/framework/$f /sdcard/vrtheme-backup/system/framework/
done
echo "Backups done for frameworks"
fi
# repeat for /data/sec_data now
[ -d /sdcard/vrtheme/data/sec_data ] && datasecapps=1 || datasecapps=0
if [ "$datasecapps" -eq "1" ]; then
echo "Processing /data/sec_data/"
busybox mkdir -p /sdcard/vrtheme-backup/data/sec_data/
busybox mkdir -p /sdcard/vrtheme/apply/data/sec_data/
cd /sdcard/vrtheme/data/sec_data/
for f in $(ls)
do
echo "Processing $f"
cp /data/sec_data/$f /sdcard/vrtheme/apply/data/sec_data/
cp /data/sec_data/$f /sdcard/vrtheme-backup/data/sec_data/
done
echo "Backups done for data sec data"
fi
# repeat for /data/app now
[ -d /sdcard/vrtheme/data/app ] && dataapps=1 || dataapps=0
if [ "$dataapps" -eq "1" ]; then
echo "Processing /data/app/"
busybox mkdir -p /sdcard/vrtheme-backup/data/app/
busybox mkdir -p /sdcard/vrtheme/apply/data/app/
cd /sdcard/vrtheme/data/app/
for f in $(ls)
do
echo "Processing $f"
cp /data/app/$f /sdcard/vrtheme/apply/data/app/
cp /data/app/$f /sdcard/vrtheme-backup/data/app/
done
echo "Backups done for data app"
fi
# for each of the system apps needing processed
cd /sdcard/vrtheme/apply/system/app/
for f in $(ls)
do
echo "Working on $f"
cd /sdcard/vrtheme/system/app/$f/
/sdcard/vrtheme/zip -r /sdcard/vrtheme/apply/system/app/$f *
done
echo "Patched system files"
if [ "$preload" -eq "1" ]; then
cd /sdcard/vrtheme/apply/preload/symlink/system/app/
for f in $(ls)
do
echo "Working on $f"
cd /sdcard/vrtheme/preload/symlink/system/app/$f/
/sdcard/vrtheme/zip -r /sdcard/vrtheme/apply/preload/symlink/system/app/$f *
done
echo "Patched preload files"
fi
if [ "$framework" -eq "1" ]; then
cd /sdcard/vrtheme/apply/system/framework
for f in $(ls)
do
echo "Working on $f"
cd /sdcard/vrtheme/system/framework/$f/
/sdcard/vrtheme/zip -r /sdcard/vrtheme/apply/system/framework/$f *
done
echo "Patched framework files"
fi
if [ "$datasecapps" -eq "1" ]; then
cd /sdcard/vrtheme/apply/data/sec_data/
for f in $(ls)
do
echo "Working on $f"
cd /sdcard/vrtheme/data/sec_data/$f/
/sdcard/vrtheme/zip -r /sdcard/vrtheme/apply/data/sec_data/$f *
done
echo "Patched sec data files"
fi
if [ "$dataapps" -eq "1" ]; then
cd /sdcard/vrtheme/apply/data/app/
for f in $(ls)
do
echo "Working on $f"
cd /sdcard/vrtheme/data/app/$f/
/sdcard/vrtheme/zip -r /sdcard/vrtheme/apply/data/app/$f *
done
echo "Patched data app files"
fi
# and now time to zipalign
cd /sdcard/vrtheme/apply/system/app/
busybox mkdir aligned
for f in $(ls)
do
echo "Zipaligning $f"
/sdcard/vrtheme/zipalign -f 4 $f ./aligned/$f
done
if [ "$preload" -eq "1" ]; then
cd /sdcard/vrtheme/apply/preload/symlink/system/app/
busybox mkdir aligned
for f in $(ls)
do
echo "Zipaligning $f"
/sdcard/vrtheme/zipalign -f 4 $f ./aligned/$f
done
fi
if [ "$framework" -eq "1" ]; then
cd /sdcard/vrtheme/apply/system/framework/
busybox mkdir aligned
for f in $(ls)
do
echo "Zipaligning $f"
/sdcard/vrtheme/zipalign -f 4 $f ./aligned/$f
done
fi
if [ "$datasecapps" -eq "1" ]; then
cd /sdcard/vrtheme/apply/data/sec_data/
busybox mkdir aligned
for f in $(ls)
do
echo "Zipaligning $f"
/sdcard/vrtheme/zipalign -f 4 $f ./aligned/$f
done
fi
if [ "$dataapps" -eq "1" ]; then
cd /sdcard/vrtheme/apply/data/app/
busybox mkdir aligned
for f in $(ls)
do
echo "Zipaligning $f"
/sdcard/vrtheme/zipalign -f 4 $f ./aligned/$f
done
fi
# time to now move each new app back to its original location
cd /sdcard/vrtheme/apply/system/app/aligned/
cp * /system/app/
chmod 644 /system/app/*
if [ "$preload" -eq "1" ]; then
cd /sdcard/vrtheme/apply/preload/symlink/system/app/aligned/
cp * /preload/symlink/system/app/
chmod 644 /preload/symlink/system/app/*
fi
if [ "$framework" -eq "1" ]; then
cd /sdcard/vrtheme/apply/system/framework/aligned/
cp * /system/framework/
chmod 644 /system/framework/*
fi
if [ "$datasecapps" -eq "1" ]; then
cd /sdcard/vrtheme/apply/data/sec_data/aligned/
cp * /data/sec_data/
chmod 644 /data/sec_data/*
fi
if [ "$dataapps" -eq "1" ]; then
cd /sdcard/vrtheme/apply/data/app/aligned/
cp * /data/app/
chmod 644 /data/app/*
fi
# Do not remove the credits from this, it's called being a douche
echo "VillainTheme is done"
# we are all done now
Cleanup.sh detail :
#!/sbin/sh
rm -rf /sdcard/vrtheme/
echo "Cleanup complete"
Hi readers !
post 1 updated.

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.

[Q&A] (WIP) all LTE bands enable (need some help)

Q&A for (WIP) all LTE bands enable (need some help)
Some developers prefer that questions remain separate from their main development thread to help keep things organized. Placing your question within this thread will increase its chances of being answered by a member of the community or by the developer.
Before posting, please use the forum search and read through the discussion thread for (WIP) all LTE bands enable (need some help). If you can't find an answer, post it here, being sure to give as much information as possible (firmware version, steps to reproduce, logcat if available) so that you can get help.
Thanks for understanding and for helping to keep XDA neat and tidy!
Bootloader unlocked! Here is how!
I found something maybe this will help you!
[Guide][Discussion][Zenfone 2] Bootloader unlocked! Here is how!
asus.com/zentalk/forum.php?mod=viewthread&tid=14664
(Source: ZenTalk)
Change the RF_SKU_ID should be a start, so who knows how to do this in the firmware?
Sent from my ASUS_Z00AD using Tapatalk
My understanding for changing bands is as follows. Any comment would be appreciated if this is not correct.
I have NOT done the following process yet. This is NOT reliable method, and this could result in Bricked.
If you try this, proceed at YOUR OWN RISK.
<Changing bands steps>
Unlocked bootloader is required.
Step1: Unpack boot.img.
Step2: modify the file 'config_init.sh'. To get Full_BAND, change RFSKUID_DETECT as follows;
(was) RFSKUID_DETECT=$(cat /sys/module/intel_mid_sfi/parameters/rf_sku_id)
(is) RFSKUID_DETECT="8"
Step3: Repack boot.img.
Step4: fastboot flash boot boot.img
Step5: fastboot reboot.
This work?
Apolonico said:
This work?
Click to expand...
Click to collapse
Need to get an answer from -fluffy- and wonder if he is reading this thread.
Sent from my ASUS_Z00AD using Tapatalk
Enable LTE
Found in the root of the phone a file "config_init.sh"
The boot actions for the zenfone 2
Code:
# software configuration related boot actions
#please sync to RF BAND
FULL_BAND=8
WW_BAND=0
TW_BAND=1
CN_BAND=2
US_BAND=3
TR_BAND=4
TEST_BAND=12
# ZX550ML RF BAND
WW_US_BAND=15
TW_CN_JP_BAND=0
WW_TEST_BAND=1
TW_TEST_BAND=8
# project ID
ZE550ML=23
ZE551ML=31
ZR550ML=28
ZX550ML=27
ZE551ML_CKD=30
RFSKUID_DETECT=$(cat /sys/module/intel_mid_sfi/parameters/rf_sku_id)
PROJID_DETECT=$(cat /sys/module/intel_mid_sfi/parameters/project_id)
COUNTRY_CODE=$(cat /factory/PhoneInfodisk/country_code)
log -p i -t config_init "PROJID: $PROJID_DETECT ,RFSKUID: $RFSKUID_DETECT"
if [ -n "$PROJID_DETECT" ]; then
case $PROJID_DETECT in
"$ZE550ML" | "$ZE551ML" | "$ZE551ML_CKD")
if [ "$COUNTRY_CODE" = "TH" ]; then
echo "V1_DSDA_ZE550ML_TH" > /config/local_config
elif [ "$COUNTRY_CODE" = "JP" ]; then
echo "V1_DSDA_ZE550ML_JP" > /config/local_config
elif [ -n "$RFSKUID_DETECT" ]; then
case $RFSKUID_DETECT in
"$FULL_BAND")
echo "V1_DSDA_ZE550ML_FULL" > /config/local_config
;;
"$WW_BAND")
echo "V1_DSDA_ZE550ML_WW" > /config/local_config
;;
"$TW_BAND")
echo "V1_DSDA_ZE550ML_TW" > /config/local_config
;;
"$CN_BAND")
echo "V1_DSDA_ZE550ML_CN" > /config/local_config
;;
"$US_BAND")
echo "V1_DSDA_ZE550ML_US" > /config/local_config
;;
"$TR_BAND")
echo "V1_DSDA_ZE550ML_TR" > /config/local_config
;;
"$TEST_BAND")
echo "V1_DSDA_ZE550ML_TEST" > /config/local_config
;;
*)
echo "V1_DSDA" > /config/local_config
;;
esac
else
echo "V1_DSDA" > /config/local_config
fi
;;
"$ZX550ML")
if [ -n "$RFSKUID_DETECT" ]; then
case $RFSKUID_DETECT in
"$WW_US_BAND")
echo "V1_SINGLE_ZX550ML_WW" > /config/local_config
;;
"$TW_CN_JP_BAND")
echo "V1_SINGLE_ZX550ML_TW" > /config/local_config
;;
"$WW_TEST_BAND")
echo "V1_SINGLE_ZX550ML_WW" > /config/local_config
;;
"$TW_TEST_BAND")
echo "V1_SINGLE_ZX550ML_TW" > /config/local_config
;;
*)
echo "V1_SINGLE_ZX550ML" > /config/local_config
;;
esac
else
echo "V1_SINGLE_ZX550ML" > /config/local_config
fi
;;
*)
echo "V1_DSDA" > /config/local_config
;;
esac
else
echo "V1_DSDA" > /config/local_config
fi
CONFIG_PATH=/local_cfg
PROPS_FILE=init.props
# Get selected software configuration
config=`cat /config/local_config`
mount -o bind /system/etc/catalog/$config /local_cfg
log -p i -t config_init "Activating configuration $config"
# Set properties for the selected configuration
# read all FeatureTeam's init.props file
for f in /local_cfg/*/init.props
do
while read l; do
# Ignore empty lines and comments
case "$l" in
''|'#'*)
continue
;;
esac
# Set property
setprop `echo ${l/=/ }`
done < $f
done
Tried to change the file "/sys/module/intel_mid_sfi/parameters/rf_sku_id" without any luck.
The phone reset the id back to original after reboot.
hi-phile said:
Need to get an answer from -fluffy- and wonder if he is reading this thread.
Sent from my ASUS_Z00AD using Tapatalk
Click to expand...
Click to collapse
I've modified 'config_init.sh' included in boot.img, but it doesn't work so far.
After boot.img flashed, bootloop occurs.
My procedures are as follows;
1. Unpack boot.img IAW http://forum.xda-developers.com/showthread.php?t=2319018.
2. Modified 'config_init.sh' as below;
3. Repack boot.img.
4. 'fastboot flash boot boot.img' and 'fastboot reboot'.
Code:
# software configuration related boot actions
#please sync to RF BAND
FULL_BAND=8
WW_BAND=0
TW_BAND=1
CN_BAND=2
US_BAND=3
TR_BAND=4
TEST_BAND=12
# ZX550ML RF BAND
WW_US_BAND=15
TW_CN_JP_BAND=0
WW_TEST_BAND=1
TW_TEST_BAND=8
# project ID
ZE550ML=23
ZE551ML=31
ZR550ML=28
ZX550ML=27
ZE551ML_CKD=30
#RFSKUID_DETECT=$(cat /sys/module/intel_mid_sfi/parameters/rf_sku_id)
PROJID_DETECT=$(cat /sys/module/intel_mid_sfi/parameters/project_id)
COUNTRY_CODE=$(cat /factory/PhoneInfodisk/country_code)
RFSKUID_DETECT=$(8)
log -p i -t config_init "PROJID: $PROJID_DETECT ,RFSKUID: $RFSKUID_DETECT"
echo "V1_DSDA_ZE550ML_FULL" > /config/local_config
#if [ -n "$PROJID_DETECT" ]; then
# case $PROJID_DETECT in
# "$ZE550ML" | "$ZE551ML" | "$ZE551ML_CKD")
#
# if [ "$COUNTRY_CODE" = "TH" ]; then
# echo "V1_DSDA_ZE550ML_TH" > /config/local_config
#
# elif [ "$COUNTRY_CODE" = "JP" ]; then
# echo "V1_DSDA_ZE550ML_JP" > /config/local_config
#
# elif [ -n "$RFSKUID_DETECT" ]; then
# case $RFSKUID_DETECT in
# "$FULL_BAND")
# echo "V1_DSDA_ZE550ML_FULL" > /config/local_config
# ;;
# "$WW_BAND")
# echo "V1_DSDA_ZE550ML_WW" > /config/local_config
# ;;
# "$TW_BAND")
# echo "V1_DSDA_ZE550ML_TW" > /config/local_config
# ;;
# "$CN_BAND")
# echo "V1_DSDA_ZE550ML_CN" > /config/local_config
# ;;
# "$US_BAND")
# echo "V1_DSDA_ZE550ML_US" > /config/local_config
# ;;
# "$TR_BAND")
# echo "V1_DSDA_ZE550ML_TR" > /config/local_config
# ;;
# "$TEST_BAND")
# echo "V1_DSDA_ZE550ML_TEST" > /config/local_config
# ;;
# *)
# echo "V1_DSDA" > /config/local_config
# ;;
# esac
# else
# echo "V1_DSDA" > /config/local_config
# fi
# ;;
# "$ZX550ML")
# if [ -n "$RFSKUID_DETECT" ]; then
# case $RFSKUID_DETECT in
# "$WW_US_BAND")
# echo "V1_SINGLE_ZX550ML_WW" > /config/local_config
# ;;
# "$TW_CN_JP_BAND")
# echo "V1_SINGLE_ZX550ML_TW" > /config/local_config
# ;;
# "$WW_TEST_BAND")
# echo "V1_SINGLE_ZX550ML_WW" > /config/local_config
# ;;
# "$TW_TEST_BAND")
# echo "V1_SINGLE_ZX550ML_TW" > /config/local_config
# ;;
# *)
# echo "V1_SINGLE_ZX550ML" > /config/local_config
# ;;
# esac
# else
# echo "V1_SINGLE_ZX550ML" > /config/local_config
# fi
# ;;
# *)
# echo "V1_DSDA" > /config/local_config
# ;;
# esac
#else
# echo "V1_DSDA" > /config/local_config
#fi
CONFIG_PATH=/local_cfg
PROPS_FILE=init.props
# Get selected software configuration
config=`cat /config/local_config`
mount -o bind /system/etc/catalog/$config /local_cfg
log -p i -t config_init "Activating configuration $config"
# Set properties for the selected configuration
# read all FeatureTeam's init.props file
for f in /local_cfg/*/init.props
do
while read l; do
# Ignore empty lines and comments
case "$l" in
''|'#'*)
continue
;;
esac
# Set property
setprop `echo ${l/=/ }`
done < $f
done
zenfone 2 lte bands
May I suggest a different approach ?
Instead of trying to change system files, if one has root priviledges, there's the possibility to communicate directly with the phone modem via "AT" commands.
I don't yet have a Zenfone 2 (ordered it yesterday from online store), but I've been playing with another mobile Intel modem (only HSPA+) in my Fonepad 8 (ALSO dual SIM) and have been able to choose single specific bands among the ones the modem supported. They're simple "at" commands sent with an echo to the tty device checking the answers with a trivial cat command . If the two modems share at least the main commands and the two devices share the same "phylosophy", you should have several communication ports named "gsmtty" followed by a number in the /dev directory of the device.
Let me know...
hello any news i have cn version? :/
Hi. I guess you have a major mistake in your modified file.
In line 27 you wrote:
RFSKUID_DETECT=$(8)
and it should be RFSKUID_DETECT=8 (as $ is to execute some cmd, RFSKUID_DETECT=$(echo 8) would be an alternative).
Hope you can solve this!
Hakataben said:
I've modified 'config_init.sh' included in boot.img, but it doesn't work so far.
After boot.img flashed, bootloop occurs.
My procedures are as follows;
1. Unpack boot.img IAW http://forum.xda-developers.com/showthread.php?t=2319018.
2. Modified 'config_init.sh' as below;
3. Repack boot.img.
4. 'fastboot flash boot boot.img' and 'fastboot reboot'.
Code:
# software configuration related boot actions
#please sync to RF BAND
FULL_BAND=8
WW_BAND=0
TW_BAND=1
CN_BAND=2
US_BAND=3
TR_BAND=4
TEST_BAND=12
# ZX550ML RF BAND
WW_US_BAND=15
TW_CN_JP_BAND=0
WW_TEST_BAND=1
TW_TEST_BAND=8
# project ID
ZE550ML=23
ZE551ML=31
ZR550ML=28
ZX550ML=27
ZE551ML_CKD=30
#RFSKUID_DETECT=$(cat /sys/module/intel_mid_sfi/parameters/rf_sku_id)
PROJID_DETECT=$(cat /sys/module/intel_mid_sfi/parameters/project_id)
COUNTRY_CODE=$(cat /factory/PhoneInfodisk/country_code)
RFSKUID_DETECT=$(8)
log -p i -t config_init "PROJID: $PROJID_DETECT ,RFSKUID: $RFSKUID_DETECT"
echo "V1_DSDA_ZE550ML_FULL" > /config/local_config
#if [ -n "$PROJID_DETECT" ]; then
# case $PROJID_DETECT in
# "$ZE550ML" | "$ZE551ML" | "$ZE551ML_CKD")
#
# if [ "$COUNTRY_CODE" = "TH" ]; then
# echo "V1_DSDA_ZE550ML_TH" > /config/local_config
#
# elif [ "$COUNTRY_CODE" = "JP" ]; then
# echo "V1_DSDA_ZE550ML_JP" > /config/local_config
#
# elif [ -n "$RFSKUID_DETECT" ]; then
# case $RFSKUID_DETECT in
# "$FULL_BAND")
# echo "V1_DSDA_ZE550ML_FULL" > /config/local_config
# ;;
# "$WW_BAND")
# echo "V1_DSDA_ZE550ML_WW" > /config/local_config
# ;;
# "$TW_BAND")
# echo "V1_DSDA_ZE550ML_TW" > /config/local_config
# ;;
# "$CN_BAND")
# echo "V1_DSDA_ZE550ML_CN" > /config/local_config
# ;;
# "$US_BAND")
# echo "V1_DSDA_ZE550ML_US" > /config/local_config
# ;;
# "$TR_BAND")
# echo "V1_DSDA_ZE550ML_TR" > /config/local_config
# ;;
# "$TEST_BAND")
# echo "V1_DSDA_ZE550ML_TEST" > /config/local_config
# ;;
# *)
# echo "V1_DSDA" > /config/local_config
# ;;
# esac
# else
# echo "V1_DSDA" > /config/local_config
# fi
# ;;
# "$ZX550ML")
# if [ -n "$RFSKUID_DETECT" ]; then
# case $RFSKUID_DETECT in
# "$WW_US_BAND")
# echo "V1_SINGLE_ZX550ML_WW" > /config/local_config
# ;;
# "$TW_CN_JP_BAND")
# echo "V1_SINGLE_ZX550ML_TW" > /config/local_config
# ;;
# "$WW_TEST_BAND")
# echo "V1_SINGLE_ZX550ML_WW" > /config/local_config
# ;;
# "$TW_TEST_BAND")
# echo "V1_SINGLE_ZX550ML_TW" > /config/local_config
# ;;
# *)
# echo "V1_SINGLE_ZX550ML" > /config/local_config
# ;;
# esac
# else
# echo "V1_SINGLE_ZX550ML" > /config/local_config
# fi
# ;;
# *)
# echo "V1_DSDA" > /config/local_config
# ;;
# esac
#else
# echo "V1_DSDA" > /config/local_config
#fi
CONFIG_PATH=/local_cfg
PROPS_FILE=init.props
# Get selected software configuration
config=`cat /config/local_config`
mount -o bind /system/etc/catalog/$config /local_cfg
log -p i -t config_init "Activating configuration $config"
# Set properties for the selected configuration
# read all FeatureTeam's init.props file
for f in /local_cfg/*/init.props
do
while read l; do
# Ignore empty lines and comments
case "$l" in
''|'#'*)
continue
;;
esac
# Set property
setprop `echo ${l/=/ }`
done < $f
done
Click to expand...
Click to collapse
Hakataben said:
My understanding for changing bands is as follows. Any comment would be appreciated if this is not correct.
I have NOT done the following process yet. This is NOT reliable method, and this could result in Bricked.
If you try this, proceed at YOUR OWN RISK.
<Changing bands steps>
Unlocked bootloader is required.
Step1: Unpack boot.img.
Step2: modify the file 'config_init.sh'. To get Full_BAND, change RFSKUID_DETECT as follows;
(was) RFSKUID_DETECT=$(cat /sys/module/intel_mid_sfi/parameters/rf_sku_id)
(is) RFSKUID_DETECT="8"
Step3: Repack boot.img.
Step4: fastboot flash boot boot.img
Step5: fastboot reboot.
Click to expand...
Click to collapse
WORKS
---------- Post added at 08:22 PM ---------- Previous post was at 08:17 PM ----------
jopframos said:
Hi. I guess you have a major mistake in your modified file.
In line 27 you wrote:
RFSKUID_DETECT=$(8)
and it should be RFSKUID_DETECT=8 (as $ is to execute some cmd, RFSKUID_DETECT=$(echo 8) would be an alternative).
Hope you can solve this!
Click to expand...
Click to collapse
sOLVED
diegobenti said:
WORKS
---------- Post added at 08:22 PM ---------- Previous post was at 08:17 PM ----------
sOLVED
Click to expand...
Click to collapse
Hi!
How did you repack the boot.img? I have been working into it since 2 months from now, and no results.
Can you share your modified boot.img?
Thanks!

General Play-systemupdate 20220118

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

Categories

Resources