-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupdate-binary
58 lines (45 loc) · 18.7 KB
/
update-binary
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/sbin/sh
export PACKAGES=/data/system/packages.xml
export PACKAGES_BACKUP=/data/system/packages-backup.xml
export OUTFD="/proc/self/fd/$2"
if [ ! -f $PACKAGES ]; then
echo "ui_print ERROR: packages.xml not found. Exiting..." > $OUTFD
echo "ui_print" > $OUTFD
exit 0
fi
echo "ui_print Backing up packages.xml..." > $OUTFD
echo "ui_print" > $OUTFD
cp $PACKAGES $PACKAGES_BACKUP
media_cert_official='308203b33082029ba003020102020900e1c286d5b6096213300d06092a864886f70d01010505003070310b30090603550406130255533113301106035504080c0a57617368696e67746f6e3110300e06035504070c0753656174746c6531123010060355040a0c094c696e656167654f5331123010060355040b0c094c696e656167654f533112301006035504030c094c696e656167654f53301e170d3137303130373034323132385a170d3434303532353034323132385a3070310b30090603550406130255533113301106035504080c0a57617368696e67746f6e3110300e06035504070c0753656174746c6531123010060355040a0c094c696e656167654f5331123010060355040b0c094c696e656167654f533112301006035504030c094c696e656167654f5330820122300d06092a864886f70d01010105000382010f003082010a0282010100cc818ef9a14c1ae3b79fb0805f59aff780e9a8b28bddf9c71703af8ffc15dc30a8439a6ebbfea3b2ca429cd07b1feb6a3b33446688964cf70f23e9637d91ef0a5654c2d4261487fdb9bb0b01abfd52f5edc2aec205a7849b0f66ac25d9e434a43e8a5cc75f11df6847c5f7d9fdad45ef0f6bf53f8c7bb73319e6a28bfee7e06e97d5d2b7d53c8cf2d2638ede5404dfd27cc39c7631c9a52eb632f79cb108b50d0e136bd639d19b4f05e5c840680a0241b86fd702c2c44b2f196e306eac2dc40066f1ea1e43496b1ba4c85fedfd68374064f139a5630dde0c84a0e9dbb7f953562fe400ff02bcc6aadfda63fd572e473da83e22bf21c1421fefb3c3707d5a97630203010001a350304e301d0603551d0e04160414fbc481032a0bed6d36b8d11d46e0ef18ebfc06b2301f0603551d23041830168014fbc481032a0bed6d36b8d11d46e0ef18ebfc06b2300c0603551d13040530030101ff300d06092a864886f70d010105050003820101007dd63789ed7427ca371673242b6c5f7fb669bcb6f681ad833e413bcba56be119df42ae035681d806a7c6fb8db17a09120b7dcde5b28752466e6afaf57339f6d9d6ef74f687535021e7c33c0c8c99bd10bcd587c2856b8ba1318ea9616aee74b6d60efd15a59014c190b9c8bb79ad942db520ff0c2fd7ebef7f68424ab9a375f7768a24a8c0f954de6c31c3880d87ec8e518daf51466a78c3182e8fcfe5774e217309b27e6110f84f0bbe89d15d21d77c4c269e14e9d88619145fdf43aa17b54388006cb8bf648001951bc5a1f2b308f6f5b1c929fa522406a84b253c3032187fa5480aaf3de4eba86b2bc43371b5eb2bf26f1ce17ab4413a5793087e41c10f05'
platform_cert_official='308203b33082029ba003020102020900d94a816d624a0050300d06092a864886f70d01010505003070310b30090603550406130255533113301106035504080c0a57617368696e67746f6e3110300e06035504070c0753656174746c6531123010060355040a0c094c696e656167654f5331123010060355040b0c094c696e656167654f533112301006035504030c094c696e656167654f53301e170d3137303130373034323132365a170d3434303532353034323132365a3070310b30090603550406130255533113301106035504080c0a57617368696e67746f6e3110300e06035504070c0753656174746c6531123010060355040a0c094c696e656167654f5331123010060355040b0c094c696e656167654f533112301006035504030c094c696e656167654f5330820122300d06092a864886f70d01010105000382010f003082010a02820101009a41d7715c8ce053804b1260bbad6c332def57bfd3d26b26102d8892ce9a3d0b780b3bf4cfc5778303470110cde8f6be1766147128731ec202977b62f1b4ae9b0e331a334a27c84c31b5885c4bd4650423cae821c7e08522515f63a9d3667f8c8b33cc9c322704e4645e37b13a50a8d04d3b04dcd0e1a87efbc32e7172f296df8ea33fcb071f9868d91a462e894fe49670ae27354dbfd14a83a23e6c775ae40761c91e416b042ceff81cf66d9e4d73c4bce7e14d6347dcbeab38820316be81decda9a7d5de8da71f1fe0e64a570da004279a6ea2628de4a839a7fdd9baa2d1c5445c6a6e7ed1949a18cd5a23cf602d7dd3d8cf17c953aa525454f17eaef84ea50203010001a350304e301d0603551d0e04160414609957d0ee9881d4d84690e80386c723b738d223301f0603551d23041830168014609957d0ee9881d4d84690e80386c723b738d223300c0603551d13040530030101ff300d06092a864886f70d0101050500038201010063e903bdcb6ee9c7767a170080caccea08a96d7f732fecdd261acdab1f651c701593051408ef0aec2de88fd7e8e7502815cc04a8b47ce35fba0179d0a3f0e7c7e0fc94cce049c34f3601e525b1b92ab19a2618749da33921b090321cff9f146eab1abd9166021a022f003e1034d0c7ba2e3937cfcd75700575fc9d542643924b4d869716eec2c226b1947bc11fe3cd45e3ba27bd52724e30fb69174d6d87199baa425642ab5b2da659ed9da32809311cbc217d1a72f60e8257a191083f210a909507fa08ce8a467b0434fee41a9c068ad0ada084ca87290f0c70b7f16e0d22a31a5dda2a0de059e63257126191a55523d714096582028e99b089b213e71467b2'
shared_cert_official='308203b33082029ba003020102020900dacb4739a1727e6e300d06092a864886f70d01010505003070310b30090603550406130255533113301106035504080c0a57617368696e67746f6e3110300e06035504070c0753656174746c6531123010060355040a0c094c696e656167654f5331123010060355040b0c094c696e656167654f533112301006035504030c094c696e656167654f53301e170d3137303130373034323132375a170d3434303532353034323132375a3070310b30090603550406130255533113301106035504080c0a57617368696e67746f6e3110300e06035504070c0753656174746c6531123010060355040a0c094c696e656167654f5331123010060355040b0c094c696e656167654f533112301006035504030c094c696e656167654f5330820122300d06092a864886f70d01010105000382010f003082010a028201010096f2f8f3dad19ee79f28256693ce970bda272f72025b4c4a6c20e027a921622530e1b780f9117c98f10b910259005a27da5020d9345844acec3da13ee0d684e067958a23dfc751ec497f5e3f3b13023c5428edc53aadbc44c10bfa84abd436bf13f8222ebf724f7e2e557e81effe21faa52b88899108cd62b7d5a84821576ed2edf50b83324a93439185b078711974395763265f7465b6bb908b0139489707cd4e76e4937545751f6b9c90d7b4bd17a234613d0919ca66e34d78906d5eaa43409e7c57d74266996f2e3f1d5a6061b65fb19f85c62829a8b3978541e64b3fa4f9febcbf5b291eaa433774c45749f73e12d377b9f9b0dfd0d7d8003a78c144a2f50203010001a350304e301d0603551d0e04160414b4dc1c6737cee40f786a398c8bb345d8a8eecbc2301f0603551d23041830168014b4dc1c6737cee40f786a398c8bb345d8a8eecbc2300c0603551d13040530030101ff300d06092a864886f70d010105050003820101002002b4557df909ace023d050f6c739b57ef311ce39abffda1b74161a71554ab78fd23b2b4b57d8c31e646f71f9063e1486a0502da00cfe4d87c4a75dd1eec6416b4460adace72a1cde79ea39f95e4fa3eb1777b9c2f080438298b963d21b54aa3aa7fc6f1b9717333c7b5244ac7862f07c34f443a72462141742f309f51e349fe21b21affcb5369c8723eef2ad2f1452b6bce685337a2751d3bd33eabece08bd62ed6801e6e331eaba7ae0a6dfb632a4fe184141013869bbdbd0d564a44091349890e178f755d14d08d6d868e4abdaa27759fcd576b1f2026db630d11639fd9672d54f0c15b03dc754c5c11ff168d3dd6b2dc7b58e7f47f472f684c41c87bd9e'
official_cert='308203b33082029ba003020102020900e10413c773c3c54f300d06092a864886f70d01010505003070310b30090603550406130255533113301106035504080c0a57617368696e67746f6e3110300e06035504070c0753656174746c6531123010060355040a0c094c696e656167654f5331123010060355040b0c094c696e656167654f533112301006035504030c094c696e656167654f53301e170d3137303130373034323132355a170d3434303532353034323132355a3070310b30090603550406130255533113301106035504080c0a57617368696e67746f6e3110300e06035504070c0753656174746c6531123010060355040a0c094c696e656167654f5331123010060355040b0c094c696e656167654f533112301006035504030c094c696e656167654f5330820122300d06092a864886f70d01010105000382010f003082010a0282010100a64dd3e1f842038ff03f67b8e9bf09530fc2913cb53e3654c78ec20dbc8b1e7113628ca5abc0860560cb442c1b51f98b6dce5e59c49037f27f64f48aef0490ab99106f0807a2130e1a8b3aacd834e656f0854b602677b66c007b14c2d0c28d0dc61341de648d879db59a9e79e12888731a3bb1c61fb58f725ac071de12b61093decc5685ac2474cee2cf22f0e44bf208410d91c5d1f60aa7945548822bad756a70e0fe17c83f35e5fa59be4dd2b446048f9b42332186ff0aa47ed39c210de9fd981c55719ec8f30caac4415c21605f13f57d0ecdf0682c484e9456748debe80e2f2e0b1cf47fb95d92fff4673e16f63781f3b2c7cd4b904041abeb5df85059990203010001a350304e301d0603551d0e0416041472963227d66c4c4d5fa0916ac22c793cd45f435c301f0603551d2304183016801472963227d66c4c4d5fa0916ac22c793cd45f435c300c0603551d13040530030101ff300d06092a864886f70d010105050003820101008a247e01c9c72e7167dec24993f23f539c07618c2819ee4d3eae96d283173aebe112469405c4c48052ef1ec72f2949ac0677b49eac5055bea2fe75a8dd3dfc8b3ccf88fb10c4a0c2779dc2861e80b445128c18485ce2b4b4f74ff0389247659b5386572374d0f9bf26ccc261e783397ca3808d5a19de26f8db84d92ac6872b0bdbc60ac768e4ac74d142e7f2c5d5c1cabbca5d1baadb923252b19ba0950370d556707c37c399c936a67e08fd1748cea5656d8add7fa2177ed630796d8de0fae9570b274a04590984d5c065fe307a5346eb54962e41f580d1a448463112e2d5f491a39bb9f9a2a0cac5855c28a35fbdb1ad4a6aeab2aea2f9056e73fc487737eb'
media_key_official='MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzIGO+aFMGuO3n7CAX1mv94DpqLKL3fnHFwOvj/wV3DCoQ5puu/6jsspCnNB7H+tqOzNEZoiWTPcPI+ljfZHvClZUwtQmFIf9ubsLAav9UvXtwq7CBaeEmw9mrCXZ5DSkPopcx18R32hHxffZ/a1F7w9r9T+Me7czGeaii/7n4G6X1dK31TyM8tJjjt5UBN/SfMOcdjHJpS62MvecsQi1DQ4Ta9Y50ZtPBeXIQGgKAkG4b9cCwsRLLxluMG6sLcQAZvHqHkNJaxukyF/t/Wg3QGTxOaVjDd4MhKDp27f5U1Yv5AD/ArzGqt/aY/1XLkc9qD4ivyHBQh/vs8NwfVqXYwIDAQAB'
platform_key_official='MIIBIjANBgkqhkiG9w0BAQEF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8wyqxEFcIWBfE/V9Ds3waCxITpRWdI3r6A4vLgsc9H+5XZL/9Gc+FvY3gfOyx81LkEBBq+td+FBZmQIDAQAB'
media_cert_release="3082034e30820236a003020102020900e01e34ce9affc701300d06092a864886f70d01010b0500303c3118301606035504030c0f6d6963726f672d6b6974746368656e3120301e06092a864886f70d0109011611616e64726f6964406d6963726f672e6d65301e170d3137303930363134313730325a170d3435303132323134313730325a303c3118301606035504030c0f6d6963726f672d6b6974746368656e3120301e06092a864886f70d0109011611616e64726f6964406d6963726f672e6d6530820122300d06092a864886f70d01010105000382010f003082010a0282010100ad4687165b38377cbe3a68f1a2637891f6db99f63fbdeb63e87041b343a3c0a0bc9459845419ae7060f89dddadf0aaa578635ec51f0706d90be84a6800b231a91f24c454f1c2a59ba1fa8bf82207385faf372c51d000134a68e07902925b1ff41d66e1321a34cb76953b02d4a8c58325271e8259c0da63968f90a1c273871940fe11fe3a0c7d33f1f7c75f85c0c36c1d3534c3d90f74acde12cc9eb15faf7cfec3cd77bd87ee27496fa16481cc0e7060c62218f211a52a2847d494f653f7bf8121c2a512e55c01b4c8730d98e83e8261da0a2354595f35696995f8c7a0c2fe3f0dedb21d0a0b5f3b4b5f715c0d213ee0e25d65e875cf40aa37d83d6bc4b190af0203010001a3533051301d0603551d0e04160414499c872822e4a5111e5b248f18bddcfcdfd7d31b301f0603551d23041830168014499c872822e4a5111e5b248f18bddcfcdfd7d31b300f0603551d130101ff040530030101ff300d06092a864886f70d01010b050003820101007d84a56aace610ef52336008f3ca08859c770222b1ba0a963efd6f40f61183c3cafd04a6c409c735f6f8235fbc3e1855bc69fdd3ee6ead6a7b92d998dee944a6776f1a334d1c92b963f7fd5a2e6e6db1419448cd0bd103037a0b63029919e64b9e65329e5b6670624bf412e2c96b7d208d4ffd64486e13148a6e447d108b6b2bb4eabf43233add3b7a9caf655a10a339896ba6299cf5066498b38bde67c744c38c37bdb66527529fb468932e538a5086bfeba162909840b7d00ec7a07e50bb5328d430368d5e157e66aa952d5f773ea165d578214f7b9d9970bac407a2f267a6d8a481b609abac2d2b904736526aac7b09b6301e52c1504dfd7d8a6a7ac0fea6"
platform_cert_release="3082034e30820236a003020102020900c57e3bea4261d108300d06092a864886f70d01010b0500303c3118301606035504030c0f6d6963726f672d6b6974746368656e3120301e06092a864886f70d0109011611616e64726f6964406d6963726f672e6d65301e170d3137303930363134313434345a170d3435303132323134313434345a303c3118301606035504030c0f6d6963726f672d6b6974746368656e3120301e06092a864886f70d0109011611616e64726f6964406d6963726f672e6d6530820122300d06092a864886f70d01010105000382010f003082010a0282010100b8216beb6bb82f06fb336c85ec4d054e5643c7ee099305ef978443cc6402af4b8334743f88fb23451b7385e95ece5199bcb379ee672d3ec0ff590b09fd3e04282afb9c1b1eb03adda38e873186a566be0f789ee820565e54fbb8e0f7a3127c87aaa4c0909a4216316a8df3fbbd73ccfe8a312fbfe9bdb320bbd482396945d3f7c62937f3ee076e4adef203942f8f6467ee71486bb5df0aafcd21605b93822e0a0a797f5f3c64aba8a04aed815b09ff23dd077e153013b23e20cb90b30cae3bcdbb220f31e24d6157848875c9f6dfabfe62cda172239a759150356cf4732514b10cf2c45dba982b5a3bdb46f51c1b1b09e19648050e48c545dc405268813bad2b0203010001a3533051301d0603551d0e041604146be983c09440088e8fa8eb9053ddcc6815bfc4b2301f0603551d230418301680146be983c09440088e8fa8eb9053ddcc6815bfc4b2300f0603551d130101ff040530030101ff300d06092a864886f70d01010b05000382010100881fef16187df9215233fe7fa5fbdfb323d508e038428372b0aef1758a8f44e96f53e279ade504d751cd9e2dacd994f14eb6c78ffe3486f3dab209e59ee7c62ba02b3aeb3732c38d366feae8868a88f867f3eb83145ce4a456a45be60ff68b89c2354ccee1d48f5e0692c10fa7967fef7228cd53741cb4fa692be4b5b0cbea8fe2deeadc79df32f9e1cca72012bb6374d073825c168c1af18db29f49408d75909a35091da3650884c1f08c922343f76c035546657bb06834757c2ba202651ed95b886d2d86df3f3f80306b26f2b975e32cb0d85ae547e1191fa551571b37412db3a411ea07f3c0dd680344185a8ddc8fce03665d531ac5a45e83096cb615cc0a"
shared_cert_release="3082034e30820236a0030201020209009708d93b973e808b300d06092a864886f70d01010b0500303c3118301606035504030c0f6d6963726f672d6b6974746368656e3120301e06092a864886f70d0109011611616e64726f6964406d6963726f672e6d65301e170d3137303930363134313832325a170d3435303132323134313832325a303c3118301606035504030c0f6d6963726f672d6b6974746368656e3120301e06092a864886f70d0109011611616e64726f6964406d6963726f672e6d6530820122300d06092a864886f70d01010105000382010f003082010a0282010100c24922bbcf9a984037dd9b4202e15f4e3766d33c2dcffa07eacd9506182498ecc7dbc88c90191345983bd463db0cce73c9192388952d0fb7610a273972440e9e921ac9eb795ebe3cad7f895b3da5cd9d0ea26a44b7e34058049523971adcbb4772af00e97c8ee5a30261fd6719fb40e8e02874d9c0025fc49b6c788035f5fddae609a27abf85e71131d8dd281dabbdd17fe439e5902b42117b88b67db29e89b479d5d5ec11eedefaf74113c23decfd116bd66d0add98797b9be52630b15c8cea539a9c1385a42854897cf71f2a324696438fca55a77bcd3c631c2413bba7994052a7b58f9a59f92e2d81040ee4a28b357a80073c7fce9526bd51b4702db2504b0203010001a3533051301d0603551d0e04160414b89c540085ee4470002b7b2b76852de1c34bee18301f0603551d23041830168014b89c540085ee4470002b7b2b76852de1c34bee18300f0603551d130101ff040530030101ff300d06092a864886f70d01010b05000382010100621004b2e59fab7abcc37618964e556bc333c7051b3bcc32cbd7e3fb730139f529838cd4990b3e0d73627b5f06c816a0fe6bb8676718955d6089fd0fa77b60f3d8080654a69903e5285fdb169a8097f43a76ced209c5b62c8a1e15bb50d6eb4e3d7605e87928e29d65bc11485051ef154f3cb8c9d5803644752862f6c591e6f8e3b45d492b50e25f0a6bc33aa01d36e9f582feb7c47cd923a6d580efd67f457162a38148cb5a74e1bc9d3f47f7d14ac82ef8d1c09f70dad59cf7678ff35a0e64fdebc22520fc8990959cd2713430590c0cc104cc706e143b399380668db80047417dc28e1404cc62f0f6623a7329129d53c590d571ea73ec51885f257972696b"
release_cert="3082034e30820236a003020102020900d0d666dd0ed8aa87300d06092a864886f70d01010b0500303c3118301606035504030c0f6d6963726f672d6b6974746368656e3120301e06092a864886f70d0109011611616e64726f6964406d6963726f672e6d65301e170d3137303930363133313534395a170d3435303132323133313534395a303c3118301606035504030c0f6d6963726f672d6b6974746368656e3120301e06092a864886f70d0109011611616e64726f6964406d6963726f672e6d6530820122300d06092a864886f70d01010105000382010f003082010a0282010100c60de8010566c9bb391cf9cfa4d1d0b01e9bac92ff721068e88808f31de4d159962a2c0e17342b48c77577e07e2934d7a8be9618bd870af6abe6dceee39962ddca553d46d6eaa4d4b695a3391cdb051ed16c9bcabc93a2f82a7bdccd390fbd9c7249a0265a378a6be6aad77ddcc59c7c8586a1895f9516d27725d55432fabe45b246f6a575b9c45e5780bcdc70a6fde6045ca828046ef693b07cdf17c733b8d80d9031058b96d9d8dd107276f421739423eb8287445abb91fb6c6dd2363ddd29b8c7b7e905b4df55d5b462e2d1c8a68ed88e0d46c5a9cc9b117e11c91a1a27bddcecf86f3a26463a8551a75904c8a9862670d54930b977bc0f586a315389c87f0203010001a3533051301d0603551d0e04160414125e842abb1679b137c27dfb5961562127490f8e301f0603551d23041830168014125e842abb1679b137c27dfb5961562127490f8e300f0603551d130101ff040530030101ff300d06092a864886f70d01010b0500038201010061651c848a9a833b125d534956bf434f0c422b7bd7340179b263370585ac4a70e11ec56fa8c8691fa59bf7e2374789ebc487e6e0e341ae29f6627d34ee02f975777621a107b1e5115da0b6db3147cd69c1e3cb752b19a225a39f996165bc27845e1c3898b696dc8ba3fa218616ef2136aa352d959613039155b1b81f69f27e931afb0e9105f9d61b0a601601b9044e159da96b0e2c5a21f675653d47bb6ebaf32e08b18656729681b7e00501b4cd8b241b1ee8515a702dc8f8f24d1c35248ab3d75ea798668c50f6100f1304c50298466a64975f1b9afb9a1d60f1b794146c80fb2c79f1f6f53fce9fc91f3c2181081426b0fa4d7ee59c45cf23700eec547238"
media_key_release="MIIBIjANBgkqhki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ETwj3s/RFr1m0K3Zh5e5vlJjCxXIzqU5qcE4WkKFSJfPcfKjJGlkOPylWne808YxwkE7unmUBSp7WPmln5Li2BBA7koos1eoAHPH/OlSa9UbRwLbJQSwIDAQAB"
release_key="MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxg3oAQVmybs5HPnPpNHQsB6brJL/chBo6IgI8x3k0VmWKiwOFzQrSMd1d+B+KTTXqL6WGL2HCvar5tzu45li3cpVPUbW6qTUtpWjORzbBR7RbJvKvJOi+Cp73M05D72cckmgJlo3imvmqtd93MWcfIWGoYlflRbSdyXVVDL6vkWyRvaldbnEXleAvNxwpv3mBFyoKARu9pOwfN8XxzO42A2QMQWLltnY3RBydvQhc5Qj64KHRFq7kftsbdI2Pd0puMe36QW031XVtGLi0cimjtiODUbFqcybEX4RyRoaJ73c7PhvOiZGOoVRp1kEyKmGJnDVSTC5d7wPWGoxU4nIfwIDAQAB"
echo "ui_print Updating /data/system/packages.xml..." > $OUTFD
echo "ui_print" > $OUTFD
sed -i "s#$media_cert_official#$media_cert_release#g" $PACKAGES
sed -i "s#$platform_cert_official#$platform_cert_release#g" $PACKAGES
sed -i "s#$shared_cert_official#$shared_cert_release#g" $PACKAGES
sed -i "s#$official_cert#$release_cert#g" $PACKAGES
sed -i "s#$media_key_official#$media_key_release#g" $PACKAGES
sed -i "s#$platform_key_official#$platform_key_release#g" $PACKAGES
sed -i "s#$shared_key_official#$shared_key_release#g" $PACKAGES
sed -i "s#$official_key#$release_key#g" $PACKAGES
echo "ui_print Setting correct file owner and permissions..." > $OUTFD
echo "ui_print" > $OUTFD
chmod 660 $PACKAGES
chown system:system $PACKAGES
echo "ui_print File updating complete. Flash a LineageOS for microG ZIP *NOW*!" > $OUTFD
echo "ui_print" > $OUTFD
exit 0