loading...

الکتروبو | علم به زبان ساده

آموزش علوم به زبان ساده

بازدید : 1
پنجشنبه 22 اسفند 1403 زمان : 19:01
  • 1
  • 2
  • 3
  • 4
  • 5

الکتروبو | علم به زبان ساده

to work with Amlogic Image file you need 2 different toolset. 1) to unpack image 2) to flash image on the device

we have 2 different type of amlogic. the old chipset such as s905x3 uses old protocol to flash image, and in newer version of amlogic such as S905Y4 introduce a new protocol called ADNL so we should use currect protocol to connect to device and flash image.

and in other hands to unpack system.img file we have 2 different aspect, for android 10 and above the super image introduced and the system.img had been deleted, so we should unpack super partition to access system.img and to unpack super parititon we have to use lpunpack program (from google) but in previous version of android (such as android 9 and older) the system.img is ready and we can mount it simply.

to Flash image on newer version of Amlogic such as S905Y4 (with ADNL protocol) and the older version you can use this repo (download the corresponding .zip file)

Amlogic-Flash-Tools-Backup

and for unpack amlogic image use this tools:

linux-amlogic-toolkit

بازدید : 0
پنجشنبه 17 بهمن 1403 زمان : 22:01
  • 1
  • 2
  • 3
  • 4
  • 5

الکتروبو | علم به زبان ساده

to root your device when you have access to image you can copy init_boot_a.PARTITION file from image and push it to your device then patch it with Magisk app. pull it from device and flash it on device. I replaced it with original init_boot_a.PARTITION and repack again and flash whole image.

this is step by step guid:

Magisk Document

بازدید : 1
پنجشنبه 17 بهمن 1403 زمان : 22:01
  • 1
  • 2
  • 3
  • 4
  • 5

الکتروبو | علم به زبان ساده

first we need set KODI as Launcher for Android so we need these changes:

you can do this with thishelper text.

MODIFY ANDROIDMANIFEST.XML.IN TO MAKE KODI DETECTED AS A LAUNCHER

Modify tools/android/packaging/xbmc/AndroidManifest.xml.into make Kodi a launcher so that:
Launcher intent filter is added to Main activity:

								
									
									
									
									
									
									
								
							

Splash and Main activities have android:launchMode="singleTop"
Splash and Main activities have android:documentLaunchMode="never"
Splash and Main activities have android:excludeFromRecents="true"
The developer guidelines suggest setting android:launchMode="singleTask" and androidConfusedtateNotNeeded="true" for launchers but this causes significant load times (as it starts from scratch every time you go to the home screen) and I have found no issues running with singleTop and no stateNotNeeded.

MODIFY XBMCAPP.CPP TO CATCH HOME BUTTON INTENT
To react to "Home button press" add handling for android.intent.action.MAIN/android.intent.category.HOME in void CXBMCApp::onNewIntent(CJNIIntent intent) (found on line 1076 in xbmc/platform/android/activity/XBMCApp.cpp):

if(action == "android.intent.action.MAIN" && intent.hasCategory("android.intent.category.HOME"))
  {
    CApplicationMessenger::GetInstance().PostMsg(TMSG_GUI_ACTIVATE_WINDOW, WINDOW_HOME, 0, nullptr); // Sets Home window as active
  } else // below is original code
  if (!targetFile.empty() &&  (action == "android.intent.action.VIEW" || action == "android.intent.action.GET_CONTENT"))
  {
    CLog::Log(LOGDEBUG, "-- targetFile: %s", targetFile.c_str());
    ...

The above will send Kodi to Home.xml when the Home button is pressed (the key press doesn't generate a key press event, it only generates a MAIN/HOME intent). One could look at clearing the "Kodi window stack" as well (so that back button press after pressing home goes nowhere).

بازدید : 0
پنجشنبه 17 بهمن 1403 زمان : 22:01
  • 1
  • 2
  • 3
  • 4
  • 5

الکتروبو | علم به زبان ساده

this instructions uses for unpack amlogicimage file and unpack super.img file and then repack and flash on the device.

./bin/unpack  ./path/to/image.img
cd output/image
../../bin/simg2img super.PARTITION ./super.img
lpunpack ./super.img supers
cd supers
resize2fs ./system_a.img 1300M
e2fsck -E unshare_blocks ./system_a.imge2fsck -E unshare_blocks ./system_a.img
e2fsck -f ./system_a.img
mkdir sys
sudo losetup -P /dev/loop0 ./system_a.img
sudo mount /dev/loop0 ./sys -rw
cd sys
(make changes)
cd ..
sudo umount sys
resize2fs -M ./system_a.img
e2fsck -f ./system_a.img
resize2fs -M ./system_a.img
e2fsck -f ./system_a.img

lpmake 
  --metadata-size=65536 
  --metadata-slots=3 
  --device super:2097152000 
  --group amlogic_dynamic_partitions_a:2086666240 
  --group amlogic_dynamic_partitions_b:2086666240 
  --partition system_a:readonly:1156333568:amlogic_dynamic_partitions_a 
  --image system_a=./system_a.img 
  --partition system_b:readonly:0:amlogic_dynamic_partitions_b 
  --partition vendor_a:readonly:157237248:amlogic_dynamic_partitions_a 
  --image vendor_a=./vendor_a.img 
  --partition vendor_b:readonly:0:amlogic_dynamic_partitions_b 
  --partition product_a:readonly:455888896:amlogic_dynamic_partitions_a 
  --image product_a=./product_a.img 
  --partition product_b:readonly:0:amlogic_dynamic_partitions_b 
  --partition odm_a:readonly:962560:amlogic_dynamic_partitions_a 
  --image odm_a=./odm_a.img 
  --partition odm_b:readonly:0:amlogic_dynamic_partitions_b 
  --partition system_ext_a:readonly:173031424:amlogic_dynamic_partitions_a 
  --image system_ext_a=./system_ext_a.img 
  --partition system_ext_b:readonly:0:amlogic_dynamic_partitions_b 
  --partition vendor_dlkm_a:readonly:59121664:amlogic_dynamic_partitions_a 
  --image vendor_dlkm_a=./vendor_dlkm_a.img 
  --partition vendor_dlkm_b:readonly:0:amlogic_dynamic_partitions_b 
  --partition system_dlkm_a:readonly:348160:amlogic_dynamic_partitions_a 
  --image system_dlkm_a=./system_dlkm_a.img 
  --partition system_dlkm_b:readonly:0:amlogic_dynamic_partitions_b 
  --partition odm_dlkm_a:readonly:348160:amlogic_dynamic_partitions_a 
  --image odm_dlkm_a=./odm_dlkm_a.img 
  --partition odm_dlkm_b:readonly:0:amlogic_dynamic_partitions_b 
  --sparse 
  --output ../super.PARTITION

./bin/repack ./name.img
./aml-burn-tool -b VIM4 -i /mnt/program/linux-amlogic-toolkit/name.img

tools URL address:

https://github.com/khadas/utils/tree/master

https://github.com/natinusala/linux-amlogic-toolkit/tree/master

تعداد صفحات : -1

آمار سایت
  • کل مطالب : 0
  • کل نظرات : 0
  • افراد آنلاین : 2
  • تعداد اعضا : 0
  • بازدید امروز : 3
  • بازدید کننده امروز : 4
  • باردید دیروز : 0
  • بازدید کننده دیروز : 1
  • گوگل امروز : 0
  • گوگل دیروز : 0
  • بازدید هفته : 5
  • بازدید ماه : 5
  • بازدید سال : 8
  • بازدید کلی : 28
  • کدهای اختصاصی