9 pagesV  < 1 2 3 4 5 6 > »  
 
REPLY
> Bash script as update-binary for zip update | We use simple and beautiful shell scripts instead of edify, we save.
What do you like more?
What technology do you prefer:
Simple and clear Unix-Shell script, whose possibilities are almost endless [ 81 ] ** [92,05%]
Difficult to understand and debug script edify, which has limitations [ 7 ] ** [7,95%]
Total votes: 88
 
Twaikyont
Message#1
30.01.15, 01:09
Only hardcore
*********
[offline]

Group: Curators
Messages 4851
Check in: 27.12.12

Reputation:-  356  +

Bash-������ � �������� update-binary ��� ZIP-���������� download



useful links
How does Recovery run the update?
S-trace, with my additions @ 09/10/2012, 00:33*
A bit of theory about how to install a Zip archive from Recovery.
Recovery extracts the file META-INF / com / google / android / update-binary to / tmp from the archive with the update, makes it chmod 777 and starts by passing three parameters:
$ 1. API level. This number is from 1 to 3 (in my case it was 2). For us, completely useless.
$ 2. Pipe descriptor for Recovery feedback. We will deal with it in more detail later.
$ 3. The full name of the zip update. Here I think everything is clear.
Is there a blank?
There is. Normal multi-line output is organized (with the usual ui_print, everything was displayed in one line).
Bash script as update-binary for ZIP-update (Post ottiwell # 52319644)
Advantages over Edify
1. A simple and understandable Unix-Shell script, whose capabilities are almost endless, instead of the hard-to-understand and debug script of edify, which has limitations
2. Significant space savings by eliminating unnecessary binaries.
3. A large numberready solutionsfor all occasions.


Post has been editedottiwell - 19.08.16, 18:51
Reason for editing: RekGRpth scripts
twaik
Message#22
16.05.14, 23:35
Local
*****
[offline]

Group: Banned
Messages 148
Check in: 21.04.14
Samsung Galaxy Young GT-S5360

Reputation:-  12  +

S-trace @ 09/10/2012, 01:33*
Analog to getprop from edify, but incomplete. Making this gerprop work for me did not work.

Is not it / system / bin / getprop?
Twaikyont
Message#23
15.07.14, 17:36
Only hardcore
*********
[offline]

Group: Curators
Messages 4851
Check in: 27.12.12

Reputation:-  356  +

A little finalized script. Now it looks like a regular update.zip archive with update-binary and updater-script. The contents of the archive is unpacked in / update. I will accept any suggestions for revision.
Attached fileupdate.zip(1.23 KB)

From the new: the output is normal, multi-line, displays on the recovery.

Post has been editedottiwell - 15.07.14, 17:44
Twaikyont
Message#24
15.07.14, 19:41
Only hardcore
*********
[offline]

Group: Curators
Messages 4851
Check in: 27.12.12

Reputation:-  356  +

I know that I have begun to be wise, but have worked a little more. Now you can add binaries / other functions to the archive. The set_progress started up normally, but I didn’t notice much of a result, show_progress is apparently implemented somehow through set_progress. We still need to understand. It is possible that you will have to pick the source of the edify binary.
Attached fileupdate.zip(1.96 KB)
Softor
Message#25
15.07.14, 20:02
Not a wizard, learning.
*********
[offline]

Group: Curators
Messages 3451
Check in: 18.01.12

Reputation:-  818  +

* ottiwell,
Something you really are wise ..


--------------------
SMARTInfo- information about the smartphone.New name - new features.
ZipCreator
For any questions, contact QMS
uzerlinux
Message#26
02.03.15, 15:27
Chukchi is not a writer
********
[offline]

Group: Friendssavagemessiahzine.com
Messages 1506
Check in: 10.11.11
Honor 7C

Reputation:-  375  +

Guys have a couple of questions
1. how to format / system / data ...
now it is necessary to be limited to rm -rf / system / *
2. Tell me how to unpack not the entire archive but separate files.
There is for example custpack.tar.gz and system.tar.gz, that is, extract system.tar.gz to the temp folder to do a certain operation, then delete,
and so with system.tar.gz. If both are immediately unpacked, then if a certain size is exceeded, it crashes.
While writing, I visited a thought through dd with zeros.in 2 posts there. Does anyone practice this?
It all started withthis post, thanks to the author.

Post has been editeduzerlinux - 02.03.15, 15:30
Twaikyont
Message#27
02.03.15, 16:13
Only hardcore
*********
[offline]

Group: Curators
Messages 4851
Check in: 27.12.12

Reputation:-  356  +

* uzerlinux,
1. In pure form on sh, you will not format it without knowing the full path to the section. But you can try through mkfs.ext2 if ext2 is needed.
2. Try ittar how to extract one file?

Post has been editedottiwell - 02.03.15, 16:14
uzerlinux
Message#28
02.03.15, 16:27
Chukchi is not a writer
********
[offline]

Group: Friendssavagemessiahzine.com
Messages 1506
Check in: 10.11.11
Honor 7C

Reputation:-  375  +

if ext2 is needed.
Ext4 needed
2. Try tar how to extract one file?
Thank you, but not much is needed.
It is necessary to extract from the update itself
uzerlinux @ 03/02/2015, 15:27*
that is, extract system.tar.gz to the temp folder
not all at once.

Post has been editeduzerlinux - 02.03.15, 16:30
Twaikyont
Message#29
02.03.15, 16:49
Only hardcore
*********
[offline]

Group: Curators
Messages 4851
Check in: 27.12.12

Reputation:-  356  +

uzerlinux @ 03/02/2015, 15:27*
Ext4 needed
Well, that is mkfs.ext4
uzerlinux @ 03/02/2015, 15:27*
It is necessary to extract from the update itself
Extract separate what? If you need to have access to the files without unpacking, then try using disk images, using mount you can mount and copy files from them to files wherever you want. And also
uzerlinux @ 03/02/2015, 14:27*
do a certain operation, then delete
uzerlinux
Message#30
03.03.15, 01:49
Chukchi is not a writer
********
[offline]

Group: Friendssavagemessiahzine.com
Messages 1506
Check in: 10.11.11
Honor 7C

Reputation:-  375  +

...
Well, that is mkfs.ext4

Where there is? In the recovery it is not, from the side I do not want to.
Dealt with the second, disappears.
Twaikyont
Message#31
03.03.15, 10:30
Only hardcore
*********
[offline]

Group: Curators
Messages 4851
Check in: 27.12.12

Reputation:-  356  +

* uzerlinux,
1. mkfs.ext2 is in busybox
2. You never answered what to extract.
uzerlinux
Message#32
03.03.15, 15:01
Chukchi is not a writer
********
[offline]

Group: Friendssavagemessiahzine.com
Messages 1506
Check in: 10.11.11
Honor 7C

Reputation:-  375  +

Ottiwell @ 03/03/2015 10:30*
1. mkfs.ext2 is in busybox
What did not find how ext4 to get.
Ottiwell @ 03/03/2015 10:30*
2. You never answered what to extract.
A piece of the script, so it will be more clear, I selected it
mkdir / upd

ui_print "- Flash / system ..."
unzip -o "$ ZIP" system.tar.gz -d / upd
rm -rf / system / *
tar -xvzpf /upd/system.tar.gz -C /
rm -rf /upd/system.tar.gz

ui_print "- Flash / custpack ..."
unzip -o "$ ZIP" custpack.tar.gz -d / upd
rm -rf / custpack / *
tar -xvzpf /upd/custpack.tar.gz -C /
rm -rf /upd/custpack.tar.gz

ui_print "- Flash / data ..."
unzip -o "$ ZIP" data.tar.gz -d / upd
rm -rf / data / *
tar -xvzpf /upd/data.tar.gz -C /
rm -rf /upd/data.tar.gz

ui_print "- Flash boot ..."
unzip -o "$ ZIP" boot.img -d / upd
dd if = / upd / boot.img of = / dev / block / mmcblk0p24
rm -rf / upd / *
Twaikyont
Message#33
03.03.15, 15:56
Only hardcore
*********
[offline]

Group: Curators
Messages 4851
Check in: 27.12.12

Reputation:-  356  +

* uzerlinux,
1.
busybox mkfs.ext2
2. Here, dd will suit you everywhere, then you don’t need to extract anything from tar, only on a computer you need to overtake everything from tar to img. And it will be like boot.img.

Post has been editedottiwell - 03.03.15, 15:56
uzerlinux
Message#34
03.03.15, 16:06
Chukchi is not a writer
********
[offline]

Group: Friendssavagemessiahzine.com
Messages 1506
Check in: 10.11.11
Honor 7C

Reputation:-  375  +

Ottiwell @ 03/03/2015, 15:56*
Here dd will suit you everywhere
Yes, I know that dd will do, and that’s what I’ve just figured out. In the last post, the working code.
Ottiwell @ 03/03/2015, 15:56*
busybox mkfs.ext2
And with this, it is just not clear what keys to use. Okay, I’ll stop on rm *
Twaikyont
Message#35
03.03.15, 17:05
Only hardcore
*********
[offline]

Group: Curators
Messages 4851
Check in: 27.12.12

Reputation:-  356  +

* uzerlinux,
But this should help
busybox mkfs.vfat --help
mixa3607
Message#36
10.05.15, 16:59
Local
*****
[offline]

Group: Friendssavagemessiahzine.com
Messages 340
Check in: 16.04.15
Blackview a8 max

Reputation:-  47  +

Help me write a script to copy files to system \ priv-app then the tablet on x86 doesn’t want to run the regular update binary for an interval. Throws out code225
uzerlinux
Message#37
10.05.15, 17:11
Chukchi is not a writer
********
[offline]

Group: Friendssavagemessiahzine.com
Messages 1506
Check in: 10.11.11
Honor 7C

Reputation:-  375  +

Mixa3607 @ 05/10/2015, 16:59*
script to copy files to system \ priv-app
TryAttached filepriv-app.zip(1.11 KB)
mixa3607
Message#38
11.05.15, 13:18
Local
*****
[offline]

Group: Friendssavagemessiahzine.com
Messages 340
Check in: 16.04.15
Blackview a8 max

Reputation:-  47  +

* uzerlinux,
I do not know if it helped or not, but still thanks a lot.
I just tried a lot of things and he thought that this was his first inclusion so I don’t know from when he started to turn on.
RecGRpth
Message#39
10.03.16, 12:07
Experienced
******
[offline]

Group: Friendssavagemessiahzine.com
Messages 408
Check in: 17.03.08
BQ-mobile BQS-4800 Blade

Reputation:-  184  +

here, if anyone is interested in the scripts that I use
Boot installation
#! / sbin / sh

PIPE = $ 2; ZIP = $ 3

ui_print () {
echo "ui_print $ 1">/ proc / self / fd / $ PIPE
echo "ui_print">/ proc / self / fd / $ PIPE
}

ui_print unzip
unzip -o "$ ZIP" -x "META-INF / *"

ui_print dd
dd if = / tmp / bootimg.img of = / dev / bootimg
Installing the backup
#! / sbin / sh

PIPE = $ 2; ZIP = $ 3

ui_print () {
echo "ui_print $ 1">/ proc / self / fd / $ PIPE
echo "ui_print">/ proc / self / fd / $ PIPE
}

ui_print unzip
unzip -o "$ ZIP" -x "META-INF / *"

ui_print dd
dd if = / tmp / recovery.img of = / dev / recovery
System installation
#! / sbin / sh

PIPE = $ 2; ZIP = $ 3

export LD_LIBRARY_PATH = / system / lib

ui_print () {
echo "ui_print $ 1">/ proc / self / fd / $ PIPE
echo "ui_print">/ proc / self / fd / $ PIPE
}

ui_print mount
mount system

ui_print rm
rm -rf / system / *

ui_print unzip
unzip -o "$ ZIP" -x "META-INF / *"

ui_print chown
chown -R 0: 0 / system
chown -R 0: 2000 / system / bin
chown -R 0: 2000 / system / vendor
chown -R 0: 2000 / system / xbin
chown 0: 0 / system / bin / uncrypt
chown 0: 0 /system/bin/install-recovery.sh
chown 0: 3003 / system / bin / netcfg
chown 0: 0 / system / bin / ping
chown 0: 0 / system / xbin / su
chown 0: 0 / system / xbin / tcpdump
chown 1014: 2000 / system / etc / dhcpcd / dhcpcd-run-hooks
chown 1001: 1000 / system / etc / ril
chown 1014: 2000 /system/etc/wide-dhcpv6/dhcp6c.script
chown 0: 1000 /system/etc/throttle.sh
chown 0: 0 /system/vendor/lib/libwvdrm_L3.so
chown 0: 0 /system/vendor/lib/libwvm.so
chown 0: 0 /system/vendor/lib/libWVStreamControlAPI_L3.so
chown 0: 0 /system/vendor/lib/drm/libdrmwvmplugin.so
chown 0: 0 /system/vendor/lib/hw/audio.a2dp.blueangel.so
chown 0: 0 /system/vendor/lib/hw/bluetooth.blueangel.so
chown 0: 0 /system/vendor/lib/mediadrm/libdrmclearkeyplugin.so
chown 0: 0 /system/vendor/lib/mediadrm/libmockdrmcryptoplugin.so
chown 0: 0 /system/vendor/lib/mediadrm/libwvdrmengine.so

ui_print chmod
chmod -R u + rwX, go + rX, go-w / system
chmod -R 0755 / system / bin
chmod -R 0755 / system / xbin
chmod -R 0755 /system/etc/init.d
chmod -R 0755 /system/etc/init.d.loop
chmod 02750 / system / bin / netcfg
chmod 0750 / system / bin / ril
chmod 0444 /system/bin/ril/oper.lis
chmod 0750 / system / bin / run-as
chmod 0750 /system/bin/install-recovery.sh
chmod 0750 / system / bin / uncrypt
chmod 04755 / system / xbin / busybox
chmod 06755 / system / xbin / su
chmod 0550 / system / etc / dhcpcd / dhcpcd-run-hooks
chmod 0555 / system / etc / ppp / ip-down
chmod 0555 / system / etc / ppp / ip-up
chmod 0555 / system / etc / ppp / ip-up-vpn
chmod 0550 /system/etc/wide-dhcpv6/dhcp6c.script
chmod 0700 / system / lost + found

ui_print ln
ln -s aee_aed / system / bin / debuggerd
ln -s mksh / system / bin / sh
ln -s / system / xbin / su / system / bin / su
ln -s toolbox / system / bin / cat
ln -s toolbox / system / bin / chcon
ln -s toolbox / system / bin / chmod
ln -s toolbox / system / bin / chown
ln -s toolbox / system / bin / clear
ln -s toolbox / system / bin / cmp
ln -s toolbox / system / bin / cp
ln -s toolbox / system / bin / date
ln -s toolbox / system / bin / dd
ln -s toolbox / system / bin / df
ln -s toolbox / system / bin / dmesg
ln -s toolbox / system / bin / du
ln -s toolbox / system / bin / getenforce
ln -s toolbox / system / bin / getevent
ln -s toolbox / system / bin / getprop
ln -s toolbox / system / bin / getsebool
ln -s toolbox / system / bin / grep
ln -s toolbox / system / bin / hd
ln -s toolbox / system / bin / id
ln -s toolbox / system / bin / ifconfig
ln -s toolbox / system / bin / iftop
ln -s toolbox / system / bin / insmod
ln -s toolbox / system / bin / ioctl
ln -s toolbox / system / bin / ionice
ln -s toolbox / system / bin / kill
ln -s toolbox / system / bin / ln
ln -s toolbox / system / bin / load_policy
ln -s toolbox / system / bin / log
ln -s toolbox / system / bin / ls
ln -s toolbox / system / bin / lsmod
ln -s toolbox / system / bin / lsof
ln -s toolbox / system / bin / md5
ln -s toolbox / system / bin / mkdir
ln -s toolbox / system / bin / mkswap
ln -s toolbox / system / bin / mount
ln -s toolbox / system / bin / mv
ln -s toolbox / system / bin / nandread
ln -s toolbox / system / bin / netstat
ln -s toolbox / system / bin / newfs_msdos
ln -s toolbox / system / bin / notify
ln -s toolbox / system / bin / printenv
ln -s toolbox / system / bin / ps
ln -s toolbox / system / bin / readlink
ln -s toolbox / system / bin / renice
ln -s toolbox / system / bin / restorecon
ln -s toolbox / system / bin / rm
ln -s toolbox / system / bin / rmdir
ln -s toolbox / system / bin / rmmod
ln -s toolbox / system / bin / route
ln -s toolbox / system / bin / runcon
ln -s toolbox / system / bin / schedtop
ln -s toolbox / system / bin / sendevent
ln -s toolbox / system / bin / setconsole
ln -s toolbox / system / bin / setenforce
ln -s toolbox / system / bin / setprop
ln -s toolbox / system / bin / setsebool
ln -s toolbox / system / bin / sleep
ln -s toolbox / system / bin / smd
ln -s toolbox / system / bin / start
ln -s toolbox / system / bin / stop
ln -s toolbox / system / bin / swapoff
ln -s toolbox / system / bin / swapon
ln -s toolbox / system / bin / sync
ln -s toolbox / system / bin / top
ln -s toolbox / system / bin / touch
ln -s toolbox / system / bin / umount
ln -s toolbox / system / bin / uptime
ln -s toolbox / system / bin / vmstat
ln -s toolbox / system / bin / watchprops
ln -s toolbox / system / bin / wipe
ln -s Roboto-Regular.ttf /system/fonts/DroidSans.ttf
#ln -s Roboto-Regular.ttf /system/fonts/DroidSans-Regular.ttf
#ln -s Roboto-Italic.ttf /system/fonts/DroidSans-Italic.ttf
ln -s Roboto-Bold.ttf /system/fonts/DroidSans-Bold.ttf
#ln -s Roboto-BoldItalic.ttf /system/fonts/DroidSans-BoldItalic.ttf
ln -s AndroidClock.ttf /system/fonts/AndroidClock_Highlight.ttf
ln -s AndroidClock.ttf /system/fonts/AndroidClock_Solid.ttf
ln -s libGLESv2.so /system/lib/libGLESv3.so

ui_print busybox
/ system / xbin / busybox --list | tr -d '\ r' | while read APPLET; do ln -s busybox / system / xbin / $ APPLET; done

ui_print chcon
cat / file_contexts | grep -e '^ / system' | tr -d '\ - \ -' | while read p c; do
if echo "$ p" | grep "(">/ dev / null; then
p = `echo" $ p "| tr -d '(. *)?' `
chcon -R $ c $ p
else
chcon $ c $ p
fi
done
chcon u: object_r: runas_exec: s0 / system / bin / run-as
chcon u: object_r: su_exec: s0 / system / bin / su

ui_print umount
umount system || exit 0
Application installation
#! / sbin / sh

PIPE = $ 2; ZIP = $ 3

ui_print () {
echo "ui_print $ 1">/ proc / self / fd / $ PIPE
echo "ui_print">/ proc / self / fd / $ PIPE
}

ui_print mount
mount data

ui_print unzip
unzip -o "$ ZIP" -x "META-INF / *"

ui_print chown
chown -R 1000: 1000 / data / app

ui_print chmod
chmod 644 / data / app / *
chmod 771 / data / app

ui_print rm
find / data / app / -name "* .apk" | sort | while read APK; do
APK = $ (basename "$ APK")
APK = $ {APK%. *}
APK = $ {APK% - *}
find / data / app / -name "$ APK - *. apk" | sort | tail -n + 2 | while read P; do
rm "$ P"
done
done

ui_print chcon
chcon -R u: object_r: apk_data_file: s0 / data / app

ui_print umount
umount data || exit 0
Data installation
#! / sbin / sh

PIPE = $ 2; ZIP = $ 3

ui_print () {
echo "ui_print $ 1">/ proc / self / fd / $ PIPE
echo "ui_print">/ proc / self / fd / $ PIPE
}

A = "/ data / data / com.google.android.googlequicksearchbox / app_g3_models /data/data/com.google.android.tts/app_voices_greco_v2"

ui_print mount
mount data

ui_print rm
for p in $ A; do rm -rf $ p / *; done

ui_print unzip
unzip -o "$ ZIP" -x "META-INF / *"

ui_print chown
for p in $ A; do b = `dirname $ p`; s = `ls -lnd $ b | awk '{print $ 3}' `: ls -lnd $ b | awk '{print $ 4}' `; chown -R $ s $ p; done

ui_print chmod
for p in $ A; do chmod -R u + rwX, go-rX, go-w $ p; done

ui_print chcon
for p in $ A; do chcon -R u: object_r: app_data_file: s0 $ p; done

ui_print umount
umount data || exit 0


--------------------
Octanium
Message#40
22.04.16, 09:28
Octanium Software
******
[offline]

Group: Friendssavagemessiahzine.com
Messages 588
Check in: 18.01.14
Motorola Moto Z3 Play

Reputation:-  271  +

The program for the automatic assembly of the script, with the support of Bash instead of a binary.

Link to the topicsavagemessiahzine.com, Android Script Creator, latest update with Bash support instead of binary...Description...

There is a built-in Notepad ++ with Bash syntax for comfortable script editing.

Good luck to all! :)


--------------------
Android Script CreatorThe program for creating / editing update-script (update.zip).
Easy Recovery InstallerInstall third-party Android Recovery in one click.
blackeangel
Message#41
01.07.16, 22:30
Nothing Is Impossible! Never
*********
[online]

Group: Friendssavagemessiahzine.com
Messages 2071
Check in: 12.12.14
Xiaomi Redmi 4 Prime

Reputation:-  731  +

Hello. Tell me what's wrong with this code?
#! / sbin / sh

PIPE = $ 2; ZIP = $ 3

ui_print () {
echo "ui_print $ 1">/ proc / self / fd / $ PIPE
echo "ui_print">/ proc / self / fd / $ PIPE
}

ui_print "- Install kernel"
unzip -o "$ ZIP" * boot * .img -d "/ tmp /"
dd if = / tmp / * boot * .img of = / dev / block / platform / mtk-msdc.0 / 11230000.msdc0 / by-name / boot
rm /tmp/*boot*.img

ui_print "- Mount system"
mount system

ui_print "- Format system"
rm -rf / system / *

ui_print "- Unzip system"
unzip -o "$ ZIP" system -d "/ system /"

ui_print "- Set rules"
chown -R 0: 0 / system
chown -R 0: 2000 / system / bin
chown -R 0: 2000 / system / vendor
chown -R 0: 2000 / system / xbin
chown 0: 0 / system / bin / uncrypt
chown 0: 0 /system/bin/install-recovery.sh
chown 0: 3003 / system / bin / netcfg
chown 0: 0 / system / bin / ping
chown 0: 0 / system / xbin / su
chown 0: 0 / system / xbin / tcpdump
chown 1014: 2000 / system / etc / dhcpcd / dhcpcd-run-hooks
chown 1001: 1000 / system / etc / ril
chown 1014: 2000 /system/etc/wide-dhcpv6/dhcp6c.script
chown 0: 1000 /system/etc/throttle.sh
chown 0: 0 /system/vendor/lib/libwvdrm_L3.so
chown 0: 0 /system/vendor/lib/libwvm.so
chown 0: 0 /system/vendor/lib/libWVStreamControlAPI_L3.so
chown 0: 0 /system/vendor/lib/drm/libdrmwvmplugin.so
chown 0: 0 /system/vendor/lib/hw/audio.a2dp.blueangel.so
chown 0: 0 /system/vendor/lib/hw/bluetooth.blueangel.so
chown 0: 0 /system/vendor/lib/mediadrm/libdrmclearkeyplugin.so
chown 0: 0 /system/vendor/lib/mediadrm/libmockdrmcryptoplugin.so
chown 0: 0 /system/vendor/lib/mediadrm/libwvdrmengine.so

#ui_print chmod
chmod -R u + rwX, go + rX, go-w / system
chmod -R 0755 / system / bin
chmod -R 0755 / system / xbin
chmod -R 0755 /system/etc/init.d
chmod -R 0755 /system/etc/init.d.loop
chmod 02750 / system / bin / netcfg
chmod 0750 / system / bin / ril
chmod 0444 /system/bin/ril/oper.lis
chmod 0750 / system / bin / run-as
chmod 0750 /system/bin/install-recovery.sh
chmod 0750 / system / bin / uncrypt
chmod 04755 / system / xbin / busybox
chmod 06755 / system / xbin / su
chmod 0550 / system / etc / dhcpcd / dhcpcd-run-hooks
chmod 0555 / system / etc / ppp / ip-down
chmod 0555 / system / etc / ppp / ip-up
chmod 0555 / system / etc / ppp / ip-up-vpn
chmod 0550 /system/etc/wide-dhcpv6/dhcp6c.script
chmod 0700 / system / lost + found

ui_print "- Set symliks"
ln -s aee_aed / system / bin / debuggerd
ln -s mksh / system / bin / sh
ln -s / system / xbin / su / system / bin / su
ln -s toolbox / system / bin / cat
ln -s toolbox / system / bin / chcon
ln -s toolbox / system / bin / chmod
ln -s toolbox / system / bin / chown
ln -s toolbox / system / bin / clear
ln -s toolbox / system / bin / cmp
ln -s toolbox / system / bin / cp
ln -s toolbox / system / bin / date
ln -s toolbox / system / bin / dd
ln -s toolbox / system / bin / df
ln -s toolbox / system / bin / dmesg
ln -s toolbox / system / bin / du
ln -s toolbox / system / bin / getenforce
ln -s toolbox / system / bin / getevent
ln -s toolbox / system / bin / getprop
ln -s toolbox / system / bin / getsebool
ln -s toolbox / system / bin / grep
ln -s toolbox / system / bin / hd
ln -s toolbox / system / bin / id
ln -s toolbox / system / bin / ifconfig
ln -s toolbox / system / bin / iftop
ln -s toolbox / system / bin / insmod
ln -s toolbox / system / bin / ioctl
ln -s toolbox / system / bin / ionice
ln -s toolbox / system / bin / kill
ln -s toolbox / system / bin / ln
ln -s toolbox / system / bin / load_policy
ln -s toolbox / system / bin / log
ln -s toolbox / system / bin / ls
ln -s toolbox / system / bin / lsmod
ln -s toolbox / system / bin / lsof
ln -s toolbox / system / bin / md5
ln -s toolbox / system / bin / mkdir
ln -s toolbox / system / bin / mkswap
ln -s toolbox / system / bin / mount
ln -s toolbox / system / bin / mv
ln -s toolbox / system / bin / nandread
ln -s toolbox / system / bin / netstat
ln -s toolbox / system / bin / newfs_msdos
ln -s toolbox / system / bin / notify
ln -s toolbox / system / bin / printenv
ln -s toolbox / system / bin / ps
ln -s toolbox / system / bin / readlink
ln -s toolbox / system / bin / renice
ln -s toolbox / system / bin / restorecon
ln -s toolbox / system / bin / rm
ln -s toolbox / system / bin / rmdir
ln -s toolbox / system / bin / rmmod
ln -s toolbox / system / bin / route
ln -s toolbox / system / bin / runcon
ln -s toolbox / system / bin / schedtop
ln -s toolbox / system / bin / sendevent
ln -s toolbox / system / bin / setconsole
ln -s toolbox / system / bin / setenforce
ln -s toolbox / system / bin / setprop
ln -s toolbox / system / bin / setsebool
ln -s toolbox / system / bin / sleep
ln -s toolbox / system / bin / smd
ln -s toolbox / system / bin / start
ln -s toolbox / system / bin / stop
ln -s toolbox / system / bin / swapoff
ln -s toolbox / system / bin / swapon
ln -s toolbox / system / bin / sync
ln -s toolbox / system / bin / top
ln -s toolbox / system / bin / touch
ln -s toolbox / system / bin / umount
ln -s toolbox / system / bin / uptime
ln -s toolbox / system / bin / vmstat
ln -s toolbox / system / bin / watchprops
ln -s toolbox / system / bin / wipe
ln -s Roboto-Regular.ttf /system/fonts/DroidSans.ttf
ln -s Roboto-Bold.ttf /system/fonts/DroidSans-Bold.ttf
ln -s libGLESv2.so /system/lib/libGLESv3.so

cat / file_contexts | grep -e '^ / system' | tr -d '\ - \ -' | while read p c; do
if echo "$ p" | grep "(">/ dev / null; then
p = `echo" $ p "| tr -d '(. *)?' `
chcon -R $ c $ p
else
chcon $ c $ p
fi
done
chcon u: object_r: runas_exec: s0 / system / bin / run-as

ui_print "- Installing BusyBox"
unzip -o "$ ZIP" META-INF / busybox -d "/ system / xbin /"
chmod 0755 / system / xbin / busybox
chown 0: 0 / system / xbin / busybox
for i in $ (/ system / xbin / busybox --list); do
/ system / xbin / busybox ln -sf busybox "/ system / xbin / $ i"
done

umount system || exit 0

Ideally, you need to screw up the path to the boot taken from fstab. *
How to do it, I do not know. Tk you need to find the line containing the "/ boot" fold all that after the / boot and save it in some variable.
Bootimg does not offer, he already died on 5.1+ androids.
The beginning will be such

cat /fstab.* | grep -e '^ / boot'

I do not know further :-(

Here is what I found
for PARTITION in kern-a KERN-A android_boot ANDROID_BOOT kernel KERNEL boot BOOT lnx LNX; do
BOOTIMAGE = $ (readlink / dev / block / by-name / $ PARTITION || readlink / dev / block / platform / * / by-name / $ PARTITION || readlink / dev / block / platform / * / * / by- name / $ PARTITION)

That is, if we screw it to something like this:
for PARTITION in kern-a KERN-A android_boot ANDROID_BOOT kernel KERNEL boot BOOT lnx LNX; do
BOOTIMAGE = $ (readlink / dev / block / by-name / $ PARTITION || readlink / dev / block / platform / * / by-name / $ PARTITION || readlink / dev / block / platform / * / * / by- name / $ PARTITION)
ui_print "- Install kernel"
unzip -o "$ ZIP" * boot * .img -d "/ tmp /"
dd if = / tmp / * boot * .img of = $ BOOTIMAGE
rm /tmp/*boot*.img

Right?

Post has been editedblackeangel - 01.07.16, 23:10


--------------------
Forget the pain, forget the fear - And only the wind in the sails!
Updater Script Generator (USG)(Program for creating updater-script (update.zip) based on boot.img and system.img)

9 pagesV  < 1 2 3 4 5 6 > » 


 mobile version    Now: 04/30/19 12:51